ardabeyazoglu / php-push-helper
This package is abandoned and no longer maintained.
No replacement package was suggested.
A simple helper library to send push notifications in php using services like fcm, apns etc.
v0.1.0
2017-07-09 17:09 UTC
Requires
- php: >=5.3.0
- ext-curl: *
- ext-json: *
This package is auto-updated.
Last update: 2020-08-16 14:29:46 UTC
README
About
A php helper class to send push notifications to different services. Currently, it only supports APNS
and Google's FCM
.
Features
- By using
APNS
, you can emit messages to iOS - By using
FCM
, You can emit messages to iOS, Android, Browsers (Service Workers) or any client listeningFirebase Messaging Service
- Creates
data payloads
based on the rules specified in phonegap-push-plugin.
- Creates
Installation
composer install ardabeyazoglu/php-push-helper
Usage
$fcmApiKey = "YOUR_FCM_API_KEY"; $push = new \Push\Client(); $push->setFcm($fcmApiKey); // send using fcm $regToken = "YOUR_DEVICE_TOKEN"; $result = $push->emit($regToken, array( "title" => "Test push title", "body" => "That's it!", "custom" => "my custom data" ));
Please see the docs and examples
ToDo
- More services to integrate (Window Phone 8, UWP, Web Push etc.)
- Writing a helper class to produce json payloads