inspirapuntodo / hubspot-for-laravel
Hubspot for Laravel allows you to interact with the official hubspot PHP Api Client
Installs: 1 905
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Requires
- php: ^8.1.0
- hubspot/hubspot-php: ^5.0.0
- laravel/framework: ^9.52.0|^10.2.0
Requires (Dev)
- laravel/pint: ^1.3
- pestphp/pest: ^2.0.0
- phpstan/phpstan: ^1.9.4
README
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.