PHP code example of tapp / laravel-hubspot

1. Go to this page and download the library: Download tapp/laravel-hubspot library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

tapp / laravel-hubspot example snippets


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'),
];

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',
    ];
bash
php artisan vendor:publish --tag="hubspot-migrations"
php artisan migrate
bash
php artisan vendor:publish --tag="laravel-hubspot-config"
 bash
php artisan hubspot:sync-properties