Package Data | |
---|---|
Maintainer Username: | nikitakiselev |
Maintainer Contact: | kiselev2008@gmail.com (Nikita Kiselev) |
Package Create Date: | 2016-07-28 |
Package Last Update: | 2016-07-28 |
Language: | PHP |
License: | Unknown |
Last Refreshed: | 2024-11-25 15:01:58 |
Package Statistics | |
---|---|
Total Downloads: | 5,199 |
Monthly Downloads: | 2 |
Daily Downloads: | 0 |
Total Stars: | 1 |
Total Watchers: | 2 |
Total Forks: | 3 |
Total Open Issues: | 0 |
Sendpulse API package for Laravel 5
composer require nikitakiselev/sendpulse
Add NikitaKiselev\SendPulse\SendPulseProvider::class
to providers
config/app.php
'providers' => [
NikitaKiselev\SendPulse\SendPulseProvider::class,
],
'aliases' => [
'SendPulse' => NikitaKiselev\SendPulse\SendPulse::class,
]
Publish config
php artisan vendor:publish --provider="NikitaKiselev\SendPulse\SendPulseProvider" --tag="config"
Set the api key variables in your .env
file
SENDPULSE_API_USER_ID=null
SENDPULSE_API_SECRET=null
https://sendpulse.com/ru/integrations/api
// From container
$api = app('sendpulse');
$books = $api->listAddressBooks();
// From facade
$books = \SendPulse::listAddressBooks();
// From dependency injection
public function getBooks(\NikitaKiselev\SendPulse\Contracts\SendPulseApi $api)
{
$books = $api->listAddressBooks();
}