nirbhay94/laravel-hubspot

这将创建HubSpot中的联系人和联系人列表

dev-master 2018-11-12 08:04 UTC

This package is auto-updated.

Last update: 2024-09-12 21:33:32 UTC


README

安装

1.composer require nirbhay94/laravel-hubspot:dev-master

2.从您的HubSpot账户的集成页面获取HubSpot API密钥。

3.将您的HubSpot API密钥添加到您的.env文件中:HAPI_KEY=yourApiKey

4.将Nirbhay\Hubspot\HubspotServiceProvider::class添加到您的config/app.php文件中的服务提供者。

5.将'HubSpot' => Nirbhay\Hubspot\Facades\Hubspot::class添加到您的config/app.php文件中的别名。

php artisan vendor:publish --provider="Nirbhay\Hubspot\HubspotServiceProvider"将创建一个config/hubspot.php文件。

用法

您可以将外观用作依赖项

外观

//Echo all contacts 
$response = HubSpot::contacts();
//Create a contact 
$response = HubSpot::createContact($request->only(['firstname', 'lastname', 'email','phone','website','company','address','city','state','zip']));