1. Go to this page and download the library: Download stechstudio/laravel-hubspot library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
stechstudio / laravel-hubspot example snippets
use STS\HubSpot\Crm\Contact;
$contact = Contact::find(123);
// This will iterate over ALL your contacts!
foreach(Contact::cursor() AS $contact) {
echo $contact->id . "<br>";
}
// This will get 100 contact records, starting at 501
$contacts = Contact::take(100)->after(500)->get();
// This will get the default 50 records, starting at the first one
$contacts = Contact::get();