ivansabat / sendpulse-rest-api-laravel
A service provider and facade to set up and use the SendPulse PHP library in Laravel.
1.1.2
2025-02-06 11:50 UTC
Requires
- php: >=8.2
- ext-curl: *
- ext-json: *
- guzzlehttp/guzzle: ^7.9.2
- illuminate/contracts: *
- illuminate/support: ^11.41
- sendpulse/rest-api: ^2.0.1.2
Requires (Dev)
- laravel/pint: ^1.20
- orchestra/testbench: ^9.9
- pestphp/pest: ^3.7.4
- phpstan/phpstan: ^2.1.2
README
A service provider and facade to set up and use the SendPulse PHP library in Laravel.
Installation
- Install Package in a Laravel project:
composer require ivansabat/sendpulse-rest-api-laravel
- Set Environment Variables in .env:
SENDPULSE_API_USER_ID=your_api_user_id SENDPULSE_API_SECRET=your_api_secret
- Publish the configuration file (create sendpulse.php in the config directory).
php artisan vendor:publish --provider="IvanSabat\SendPulse\Providers\SendPulseServiceProvider"
Usage
Use the Package in your Laravel application:
use IvanSabat\Sendpulse\Facades\SendPulse; $addressBooks = SendPulse::listAddressBooks();
use IvanSabat\Sendpulse\Facades\SendPulse; $sendPulse = new Sendpulse( config('sendpulse.api_user_id'), config('sendpulse.api_secret') ); $addressBooks = $sendPulse->get('addressbooks');