2017 © Pedro Peláez
 

library laravel-sendinblue

Provides a Laravel 5 service provider, facade and config file for the SendinBlue's API v3 official PHP library.

image

vansteen/laravel-sendinblue

Provides a Laravel 5 service provider, facade and config file for the SendinBlue's API v3 official PHP library.

  • Wednesday, May 30, 2018
  • by vansteen
  • Repository
  • 0 Watchers
  • 0 Stars
  • 81 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 2600 % Grown

The README.md

Laravel Sendinblue

Latest Version on Packagist Total Downloads ![Build Status][ico-travis] [Coverage Status][link-coverage] ![Quality Score][ico-code-quality] StyleCI License, (*1)

The package simply provides a Laravel service provider, facade and config file for the SendinBlue's API v3 official PHP library. https://github.com/sendinblue/APIv3-php-library, (*2)

Installation

You can install this package via Composer using:, (*3)

composer require vansteen/laravel-sendinblue

For Laravel <5.5, you must also install the service provider and the facade to your config/app.php:, (*4)

// config/app.php
'providers' => [
    ...
    Vansteen\Sendinblue\SendinblueServiceProvider::class,
    ...
];
// config/app.php
'aliases' => [
    ...
    'Sendinblue' => Vansteen\Sendinblue\Facades\Sendinblue::class,
];

Configuration

You need to publish the config file to app/config/sendinblue.php. To do so, run:, (*5)

php artisan vendor:publish --tag=sendinblue.config

Now you need to set your configuration using environment variables. Go the the Sendinblue API settings and add the v3 API key to your .env file., (*6)

SENDINBLUE_APIKEY=xkeysib-XXXXXXXXXXXXXXXXXXX

Usage

To test it, you can add the folowing code in routes.php., (*7)

// routes.php
...
use Vansteen\Sendinblue\Facades\Sendinblue;

Route::get('/test', function () {

    // Configure API keys authorization according to the config file
    $config = Sendinblue::getConfiguration();

    // Uncomment below to setup prefix (e.g. Bearer) for API keys, if needed
    // $config->setApiKeyPrefix('api-key', 'Bearer');
    // $config->setApiKeyPrefix('partner-key', 'Bearer');

    $apiInstance = new \SendinBlue\Client\Api\ListsApi(
        // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
        // This is optional, `GuzzleHttp\Client` will be used as default.
        new GuzzleHttp\Client(),
        $config
    );

    try {
        $result = $apiInstance->getLists();
        dd($result);
    } catch (Exception $e) {
        echo 'Exception when calling AccountApi->getAccount: ', $e->getMessage(), PHP_EOL;
    }

});

To get a idea of the of the API endpoints, visit the API readme file., (*8)

Be sure to visit the SendinBlue official documentation website for additional information about our API., (*9)

Change log

Please see the changelog for more information on what has changed recently., (*10)

Testing

composer test

Contributing

Please see contributing.md for details and a todolist., (*11)

Security

If you discover any security related issues, please email author email instead of using the issue tracker., (*12)

License

license. Please see the license file for more information., (*13)

The Versions

30/05 2018

dev-master

9999999-dev https://github.com/vansteen/laravel-sendinblue

Provides a Laravel 5 service provider, facade and config file for the SendinBlue's API v3 official PHP library.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel sendinblue

30/05 2018

v0.4

0.4.0.0 https://github.com/vansteen/laravel-sendinblue

Provides a Laravel 5 service provider, facade and config file for the SendinBlue's API v3 official PHP library.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel sendinblue

30/05 2018

v0.3

0.3.0.0 https://github.com/vansteen/laravel-sendinblue

Provides a Laravel 5 service provider, facade and config file for the SendinBlue's API v3 official PHP library.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel sendinblue

30/05 2018

v0.2

0.2.0.0 https://github.com/vansteen/laravel-sendinblue

Provides a Laravel 5 service provider, facade and config file for the SendinBlue's API v3 official PHP library.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel sendinblue

25/05 2018

v0.1

0.1.0.0 https://github.com/vansteen/sendinblue

Provides a Laravel 5 service provider, facade and config file for the SendinBlue's API v3 official PHP library.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel sendinblue