hubspot-for-laravel maintained by inspirapuntodo
Hubspot for Laravel
Hubspot for Laravel is wrapper for the Hubspot CRM API allowing you to access the library in a convenient way through a facade. For a complete list of allowed methods visit the following repository HubSpot/hubspot-php.
Installation
Here's how you track your website with Hubspot for Laravel:
Requires PHP 8.1+
First, install Hubspot for Laravel via the Composer package manager:
composer require inspirapuntodo/hubspot-for-laravel
Next, publish the configuration file:
php artisan vendor:publish --provider="InspiraPuntoDo\Hubspot\ServiceProvider"
This will create a config/hubspot.php configuration file in your project, which you can modify to your needs
using environment variables:
HUBSPOT_ACCESS_TOKEN=...
HUBSPOT_USE_OAUTH2=true
Now you will be able to use de Hubspot facade:
use InspiraPuntoDo\Hubspot\Facades\Hubspot;
$contact = Hubspot::contacts()->getByEmail("email@example.com");
echo $contact->properties->email->value;
Usage
For usage examples, take a look at the HubSpot/hubspot-php repository.
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request :D
Contributors
Cesar Mendez (@Activ3mined)
Hubspot for Laravel is an open-sourced software licensed under the MIT license.