billyct/laravel-elastic-email

Downloads

40

Stars

1

Version

laravel-elastic-email

A simple Laravel wrapper for ElasticEmail.WebApiClient-php

Preparent

Instalation

[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,
]

Usage

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

Author

billyct