Download the PHP package tapp/laravel-hubspot without Composer

On this page you can find all versions of the php package tapp/laravel-hubspot. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-hubspot

Laravel HubSpot Integration

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

A Laravel package for seamless integration with HubSpot CRM. Provides automatic synchronization of Laravel models with HubSpot contacts and companies, with support for queued operations.

Installation

Configuration

Add your HubSpot API key to your .env file:

Usage

User Model Setup

Add the trait to your User model, implement the required interface, and define the HubSpot property mapping:

Interface Requirement

Important: Models must implement HubspotModelInterface to enable automatic synchronization. This interface ensures your models have the required methods for HubSpot integration:

The traits (HubspotContact, HubspotCompany) provide the implementation for these methods, so you only need to implement the interface and define your $hubspotMap array.

Company Model Setup

For company models, use the HubspotCompany trait:

Dynamic Properties

Override getHubspotProperties() to add dynamic or computed properties. The hubspot:sync-properties command discovers property keys from your map, hubspotProperties(), and getHubspotProperties(), so you only need to override this method for your dynamic keys to be created in HubSpot.

When the model has no id (e.g. hubspot:sync-properties uses new User() to discover keys), return the same keys with null values so the command can build the full list without running user-specific queries.

If you need to customize the full property set (e.g. computed values that replace or extend map-based properties), you can instead override hubspotProperties() using trait aliasing: alias the trait method (e.g. hubspotProperties as traitHubspotProperties), call $this->traitHubspotProperties($map), merge your properties, and return.

Observers (Required for Automatic Sync)

Important: Observers are required for automatic synchronization. Register observers in your AppServiceProvider to enable automatic sync when models are created/updated:

Manual Sync (Alternative)

If you prefer manual control over when syncing occurs, you can use the provided commands instead of observers:

Note: Without observers, models will only sync when you explicitly run these commands.

Sync Properties

Create the property group and properties in HubSpot:

Queuing

The package supports queued operations for better performance. Configure in your .env:

Run queue workers:

Testing

Quick Start

Setup Integration Tests

  1. Create .env.testing:

  2. Get HubSpot test API key with scopes:

    • crm.objects.contacts.read
    • crm.objects.contacts.write
    • crm.objects.companies.read
    • crm.objects.companies.write
  3. Sync test properties:

Flexible Testing

Switch between mocked and real API calls:

Testing Documentation

Upgrading

⚠️ Upgrading from a previous version? Please see the Upgrade Guide for breaking changes and migration instructions.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-hubspot with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
hubspot/api-client Version ^14.1
illuminate/contracts Version ^10.0||^11.0||^12.0||^13.0
spatie/laravel-package-tools Version ^1.16
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tapp/laravel-hubspot contains the following files

Loading the files please wait ...