artarts36 / pushall-sender
Push Sender
0.3.4
2021-05-24 23:12 UTC
Requires
- php: ^7.3 | ^8.0
Requires (Dev)
- phpunit/phpunit: ^8.0
- squizlabs/php_codesniffer: 3.*
README
Description:
Client for send push-notifications on API https://pushall.ru
PushAll API Documentation: https://pushall.ru/blog/api
Installation:
composer require artarts36/pushall-sender
Examples:
Simple:
use ArtARTs36\PushAllSender\Senders\PushAllSender; use ArtARTs36\PushAllSender\Push; $sender = new PushAllSender(123456789, 'apiKey'); $push = new Push('Message #1', 'Hello'); $sender->push($push);
Connect in Laravel:
1*. Set variables in .env:
PUSHALL_API_KEY='your key' PUSHALL_CHANNEL_ID='your channel id'
2*. Binding in bootstrap/app.php:
$app->singleton( \ArtARTs36\PushAllSender\Interfaces\PusherInterface::class, function () { return new ArtARTs36\PushAllSender\Senders\PushAllSender(env('PUSHALL_CHANNEL_ID'), env('PUSHALL_API_KEY')); } );