imdhemy / expo-notifications
PHP expo push notifications client
0.05
2021-01-30 09:25 UTC
Requires
- ext-json: *
- doctrine/collections: ^1.6
- guzzlehttp/guzzle: >=7.2
Requires (Dev)
- fakerphp/faker: ^1.13
- friendsofphp/php-cs-fixer: ^2.18
- phpunit/phpunit: ^9.5
- symfony/var-dumper: ^5.2
- vimeo/psalm: ^4.4
README
PHP expo push notifications client
Installation
You can install the package via composer
composer require imdhemy/expo-notifications
Usage
use Imdhemy\Expo\Client; use Imdhemy\Expo\Messages\Message; use Imdhemy\Expo\Messages\MessageList; $tokens = [ 'ExponentPushToken[aaaaaaaaaaaaaaaaaaaaaa]', 'ExponentPushToken[bbbbbbbbbbbbbbbbbbbbbb]', ]; $title = 'hello'; $body = 'world'; $message = new Message($title, $body); $message->addManyPushTokens($tokens); $list = MessageList::init()->addMessage($message); $client = Client::create(); $tickets = $client->push($list);