PHP code example of artarts36 / pushall-sender

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

    

artarts36 / pushall-sender example snippets


use ArtARTs36\PushAllSender\Senders\PushAllSender;
use ArtARTs36\PushAllSender\Push;

$sender = new PushAllSender(123456789, 'apiKey');
$push = new Push('Message #1', 'Hello');

$sender->push($push);

$app->singleton(
    \ArtARTs36\PushAllSender\Interfaces\PusherInterface::class,
    function () {
        return new ArtARTs36\PushAllSender\Senders\PushAllSender(env('PUSHALL_CHANNEL_ID'), env('PUSHALL_API_KEY'));
    }
);