A more straight forward package to use SendinBlue API V3 in Laravel environment (Ex : Express Solution). The package will enable you to handle SendInBlue various functions through Laravel Facade, mostly related to building email list and managing marketing campaign.
- PHP 7 and later
- Laravel 5.8+
Via Composer
$ composer require arungpisyadi/sibex
<?php
use ArungPIsyadi\SiBex\SiBex;
// These values is better kept save on .env file.
$sibex = new SiBex(SIB_API_TYPE, SIB_API_KEY); // either "api-key" or "partner-key", your SendInBlue API key.
# Account function.
dump($account = $sibex->getAccount());
dump('email: '.$account['email']); // there are other return parameters that you can check your self.
# Contact function.
// get your lists
dump($sibex->getLists($limit, $offset));
// create a new list.
dump($this->sibex->createList());
// add a new email address as our contact in SendInBlue.
$request->email = '[email protected]';
dump($sibex->createContact($request->email));
// add a contact based on email to a certain list.
$added = $sibex->addContactToList($list_id, $emails); // $list_id must be an integer, $emails is a separated by comma string.
dump($added);
//Get contacts from a list.
$contacts = $sibex->getContactsFromList($list_id);
dump($contacts);
?>
Please see the changelog for more information on what has changed recently.
$ composer test
Please see contributing.md for details and a todolist.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
GNU. Please see the license file for more information.