fungku/laravel-hubspot is a Laravel package for php hubspot api wrapper for laravel 4.
It currently has 9 GitHub stars and 26.061 downloads on Packagist (latest version v1.1.1).
Install it with composer require fungku/laravel-hubspot.
Discover more Laravel packages by fungku
or browse all Laravel packages to compare alternatives.
Last updated
PHP HubSpot API package for Laravel 4
Most of the hard-working code is modified classes from HubSpot/haPiHP.
In composer.json:
"require": {
"fungku/laravel-hubspot": "1.1.*"
}
then run composer install or composer update
Open app/config/app.php and add this to the providers array:
'Fungku\HubSpot\HubSpotServiceProvider',
TO SET YOUR API KEY:
Run the following command: $ php artisan config:publish fungku/laravel-hubspot
This will generate a config file to: app/config/packages/fungku/laravel-hubspot/api.php
You can then update this file with your api key from HubSpot and set the user agent.
You could also set an environment variable called, HUBSPOT_APIKEY
$contacts = HubSpot::contacts();
// Get 100 contacts
$contacts->get_all_contacts(array('count'=>100));
// Get a contact by email address
$contacts->get_contact_by_email('[email protected]');
$lists = HubSpot::lists();
// Get 20 lists
$lists->get_lists(array('count'=>20));