PHP code example of artjoker / sendpulse-laravel

1. Go to this page and download the library: Download artjoker/sendpulse-laravel library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

artjoker / sendpulse-laravel example snippets


'providers' => [
    Artjoker\SendpulseLaravel\SendPulseProvider::class,
],

'aliases' => [
    'SendPulse' => Artjoker\SendpulseLaravel\SendPulse::class,
]

// From container
$api = app('sendpulse-laravel');
$books = $api->listAddressBooks();

// From facade
$books = \SendPulse::listAddressBooks();

// From dependency injection
public function getBooks(\Artjoker\SendpulseLaravel\Contracts\SendPulseApi $api)
{
    $books = $api->listAddressBooks();
}
bash
php artisan vendor:publish --provider="Artjoker\SendpulseLaravel\SendPulseProvider" --tag="config"