gamesture / notify
Simple library to send mobile apps notifications to users from PHP
Installs: 27
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 7
Forks: 0
pkg:composer/gamesture/notify
Requires
- php: 7.*
This package is not auto-updated.
Last update: 2020-01-24 16:44:48 UTC
README
Notify is a simple library to send mobile apps notifications to users from PHP. Its primary usage is to send notifications to lots of users at once so main focus is performance. For now only supports Apples APNs (Android support probably in distant future).
Installation
Install with Composer
composer require gamesture/notify
Usage
use Gamesture\Notify; $provider = new Notify\Providers\Apple('/path/to/certificate.pem'); $sender = new Notify\Sender($provider); $tokens = ['XXX', 'YYY']; $message = new Notify\Message('Notification text'); //optionally set custom data: //$message->badge = 2; //$message->sound = 'bell'; //$message->custom_fields = ['notification_id' => 7]; $sender->batchSend($message, $tokens);