Skip to content

appdb-official/php-push-sender

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP push notification send library

This library allows you to send push notifications to your apps that are published on appdb.

More information about appdb push notification service can be found on Documentation website

Installation

composer require appdb/php-push-sender

Sending of push notification (sample code)

require_once 'vendor/autoload.php';

$sender = new \Appdb\PhpPushSender\PhpPushSender('push_xxx', 'xxx');


$payload = [
    'aps' => [
        'alert' => [
            'title' => 'test',
            'subtitle' => 'test notification',
            'body' => 'test at ' . date('r')
        ]
    ]
];

$destinations['c_xxx'] = []; // sending to this customer
// OR
$destinations['c_xxx'][] = 'd_xxx';  // sending to specific device of customer


$pushSendResult = $sender->send($payload, $destinations);

var_dump($pushSendResult);

About

PHP library to send push notifications via appdb push service

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages