PHP code example of nikitakiselev / sendpulse

1. Go to this page and download the library: Download nikitakiselev/sendpulse 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/ */

    

nikitakiselev / sendpulse example snippets


'providers' => [
    NikitaKiselev\SendPulse\SendPulseProvider::class,
],

'aliases' => [
    'SendPulse' => NikitaKiselev\SendPulse\SendPulse::class,
]

// 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();
}
bash
php artisan vendor:publish --provider="NikitaKiselev\SendPulse\SendPulseProvider" --tag="config"