Downloads
Stars
Version
A simple Laravel wrapper for ElasticEmail.WebApiClient-php
[1] Install package
composer require billyct/laravel-elastic-email
[2] Add this code to .env file
ELASTIC_EMAIL_API_KEY=<Add your key>
ELASTIC_EMAIL_PUBLIC_ACCOUNT_ID=<Add your account>
[3] If you are using laravel < 5.5
Add provider to your config/app.php file.
'providers' => [
// other providers
Billyct\ElasticEmail\ElasticEmailServiceProvider::class,
]
Add contact
// $client is singleton wrapper for ElasticClient
$client = app(ElasticEmailClient\ElasticClient::class);
$client->Contact->Add(...);
// or short codeļ¼
Billyct\ElasticEmail\ElasticEmail::addContact('[email protected]', 'your-list-name', ['field_1' => 'test']);