Download the PHP package peterujah/php-firebase-notification without Composer
On this page you can find all versions of the php package peterujah/php-firebase-notification. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download peterujah/php-firebase-notification
More information about peterujah/php-firebase-notification
Files in peterujah/php-firebase-notification
Package php-firebase-notification
Short Description Send firebase device push notification from php curl.
License MIT
Informations about the package php-firebase-notification
A simple php class to help you send firebase push notification from php curl. It will allow you to push cloud messaging through firebase in 3 different way.
- Send to a single device id
- Send to a multiple device ids
- Send to a specific topic subscribers
Installation
Installation is super-easy via Composer:
initialize the firebase class with your google api key
Sending a message to a single device id can be done like this.
Sending a message to a multiple user IDs can be done like this
Sending a message by topic IDs/name can be done like this
Methods
Set the notification payload node type. The default is FirebaseServiceModel::NODE_NOTIFICATION
Sets the notification to send to topic. The default is false
, pass FirebaseServiceModel::TOPIC
or true
, to enable topic.
Sets the notification body, default is message
Sets the notification image url.
Sets the notification click action for android.
Sets the notification refernce for custom use.
Sets the notification additional meta data for custom use.
Sets the notification badge id.
Sets the notification background state.
Sets the notification sound type.