laravel-gtm / hubspot-sdk
Laravel-ready PHP API SDK boilerplate built with Saloon (template repository).
v0.0.11
2026-04-21 22:35 UTC
Requires
- php: ^8.4
- illuminate/support: ^11.0 || ^12.0 || ^13.0
- saloonphp/laravel-plugin: ^4.0
- saloonphp/rate-limit-plugin: ^2.0
- saloonphp/saloon: ^4.0
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.18
- orchestra/testbench: ^9.0 || ^10.0
- pestphp/pest: ^3.8
- phpstan/phpstan: ^2.1
README
A Laravel-ready PHP SDK for the HubSpot CRM API, built with Saloon v4. Includes token auth, rate limiting, and typed response DTOs.
Requirements
- PHP
^8.4 - Laravel
^11.0 || ^12.0 || ^13.0(for the optional Laravel integration)
Supported Endpoints
| SDK Method | HTTP | API Endpoint | Since |
|---|---|---|---|
getContact() |
GET | /crm/v3/objects/contacts/{contactId} |
unreleased |
listContacts() |
GET | /crm/v3/objects/contacts |
unreleased |
listContactProperties() |
GET | /crm/v3/properties/contact |
unreleased |
getDeal() |
GET | /crm/v3/objects/deals/{dealId} |
unreleased |
listDeals() |
GET | /crm/v3/objects/deals |
v0.0.1 |
listDealProperties() |
GET | /crm/v3/properties/deal |
v0.0.3 |
Installation
composer require laravel-gtm/hubspot-sdk
Configuration (Laravel)
Publish the config (before init the tag is hubspot-sdk-config; after init it becomes {your-package-slug}-config):
php artisan vendor:publish --tag=hubspot-sdk-config
After running the init script, use your package slug in the tag (e.g. hubspot-sdk-config). Env keys use your chosen ENV_PREFIX (defaults before init use HUBSPOT_*):
HUBSPOT_BASE_URLHUBSPOT_TOKENHUBSPOT_AUTH_HEADER
Usage
Via the service container
use LaravelGtm\HubspotSdk\HubspotSdk; $sdk = app(HubspotSdk::class);
Standalone
use LaravelGtm\HubspotSdk\HubspotSdk; $sdk = HubspotSdk::make( baseUrl: 'claude', token: 'your-token', );
Development
composer test # Pest composer analyse # PHPStan composer lint # Pint (check) composer format # Pint (fix)
License
MIT. See LICENSE.