imdhemy/expo-notifications

PHP expo push notifications client

Installs: 19

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/imdhemy/expo-notifications

0.05 2021-01-30 09:25 UTC

This package is auto-updated.

Last update: 2025-09-29 02:22:32 UTC


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);