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

This package is auto-updated.

Last update: 2025-05-06 12:16:14 UTC


README

A service provider and facade to set up and use the SendPulse PHP library in Laravel.

Installation

  1. Install Package in a Laravel project:
composer require ivansabat/sendpulse-rest-api-laravel
  1. Set Environment Variables in .env:
SENDPULSE_API_USER_ID=your_api_user_id
SENDPULSE_API_SECRET=your_api_secret
  1. 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');