This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.
We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.
You can install the package via composer:
composer require tappnetwork/laravel-hubspot
You can publish and run the migrations with:
php artisan vendor:publish --tag="hubspot-migrations"
php artisan migrate
You can publish the config file with:
php artisan vendor:publish --tag="laravel-hubspot-config"
This is the contents of the published config file:
return [
'api_key' => env('HUBSPOT_TOKEN'),
'log_requests' => env('HUBSPOT_LOG_REQUESTS', true),
'property_group' => env('HUBSPOT_PROPERTY_GROUP', 'app_user_profile'),
'property_group_label' => env('HUBSPOT_PROPERTY_GROUP_LABEL', 'App User Profile'),
];
Publish the config, add your api key to the env
Add the trait to your user model and define any fields to the $hubspotMap property that will determine the data sent to HubSpot. You may use dot notation to access data from relations. For further customization, use Laravel's accessor pattern
use Tapp\LaravelHubspot\Models\HubspotContact;
class User extends Authenticatable
{
use HubspotContact;
public array $hubspotMap = [
'email' => 'email',
'first_name' => 'first_name',
'last_name' => 'last_name',
'user_type' => 'type.name',
];
run the following command to create the property group and properties.
php artisan hubspot:sync-properties
The package uses model events to create or update contacts in HubSpot. Try registering a user and see that they have been created in HubSpot with properties from the $hubspotMap array.
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
- [TappNetwork](https://github.com/Scott Grayson)
- All Contributors
The MIT License (MIT). Please see License File for more information.