PHP code example of laravel-gtm / hubspot-sdk

1. Go to this page and download the library: Download laravel-gtm/hubspot-sdk 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/ */

    

laravel-gtm / hubspot-sdk example snippets


use LaravelGtm\HubspotSdk\HubspotSdk;

$sdk = app(HubspotSdk::class);

use LaravelGtm\HubspotSdk\HubspotSdk;

$sdk = HubspotSdk::make(
    baseUrl: 'claude',
    token: 'your-token',
);

$sdk->onUnauthorized(function (\Saloon\Http\Response $response): void {
    // e.g. notify, log, or flag the user's connection as needing reauthorization
});
bash
php artisan vendor:publish --tag=hubspot-sdk-config