inspirapuntodo/hubspot-for-laravel

Hubspot for Laravel allows you to interact with the official hubspot PHP Api Client

0.1.1 2023-06-10 14:55 UTC

This package is auto-updated.

Last update: 2024-04-10 16:37:01 UTC


README

Total Downloads Latest Version License

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

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Contributors

Cesar Mendez (@Activ3mined)

Hubspot for Laravel is an open-sourced software licensed under the MIT license.