Manage newsletters in Laravel with Sendinblue
You can install the package via composer:
composer require combindma/laravel-sendinblue
You can publish the config file with:
php artisan vendor:publish --tag="sendinblue-config"
This is the contents of the published config file:
return [
/*
* Enable or disable Sendinblue. Useful for local development when running tests.
*/
'api_enabled' => env('SENDINBLUE_ENABLED', false),
/*
* The API key of a Sendinblue account.
*/
'apiKey' => env('SENDINBLUE_APIKEY'),
/*
* The default Ids of the lists to add the contact to when no listIds has been specified in a method.
*/
'defaultListIds' => [
2,
]
];
Subscribing an email address can be done like this:
Sendinblue::subscribe('[email protected]');
You can pass some merge variables as the second argument:
Sendinblue::subscribe('[email protected]', ['FNAME'=>'Rince', 'LNAME'=>'Wind'];
You can subscribe someone to a specific list ID by using the third argument:
Sendinblue::subscribe('[email protected]', ['FNAME'=>'Rince', 'LNAME'=>'Wind'], [2]);
Unsubscribing an email address can be done like this:
Sendinblue::unsubscribe('[email protected]');
composer test
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.