Sendinblue API w. support for Laravel
The package supports use with the Laravel framework v4.x or v5.x providing a SendinblueWrapper
facade., (*1)
Setup:
In order to install, add the following to your composer.json
file within the require
block:, (*2)
"require": {
…
"guillaumefauconnet/sendinblue-laravel5": "dev-master"
…
}
Within Laravel, locate the file ..config/app.php
.
Add the following to the providers
array:, (*3)
'providers' => array(
…
'CompagnieFiduciaire\Sendinblue\SendinblueServiceProvider',
…
),
Furthermore, add the following the the aliases
array:, (*4)
'aliases' => array(
…
'SendinblueWrapper' => 'CompagnieFiduciaire\Sendinblue\Facades\SendinBlueWrapper',
…
),
Run the command composer update
., (*5)
Publish the configuration:, (*6)
// Laravel v4.x
$ php artisan config:publish vansteen/sendinblue
// Laravel v5.x
$ php artisan vendor:publish
Usage:
Your unique Sendinblue API key should be set in the package's config found in app/config/packages/vansteen/sendinblue/config.php
(Laravel 4)
config/sendinblue.php
(Laravel 5), (*7)
Methods of the Sendinblue API class work as described by the Sendinblue API docs found [Here][2]. Thanks to Laravel's use of the "Facade" design pattern, all methods may be called in the following manner:, (*8)
…
// Retrieve your account info
$account = SendinblueWrapper::get_account();
…