Download the PHP package saikatdutta1991/firebasecloudmessaging without Composer
On this page you can find all versions of the php package saikatdutta1991/firebasecloudmessaging. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download saikatdutta1991/firebasecloudmessaging
More information about saikatdutta1991/firebasecloudmessaging
Files in saikatdutta1991/firebasecloudmessaging
Package firebasecloudmessaging
Short Description This is to send push notification with firebase cloud messaging for Laravel. Tested in Laravel 5.2.*
License
Informations about the package firebasecloudmessaging
Firebase Cloud Messaging
** Caveat: This package is not maintained anymore.
This Package is to enable sending push notifications to devices with firebase cloud messaging. Tested in Laravel 5.1 and 5.2
Installation
To install the package simply run this command in Laravel project root folder
add the service provider
to config\app.php
providers array
Alias the PushManager class adding it to the aliases array in the config/app.php
file.
But the alias is not mandatory.
Configuration
publish the package config to your laravel config folder with executing command
before executing this command add the service provider first
add the fcm server_key
in the config/firebase_cloud_messaging.php
file
fcm_push_url
is not required already included in package. If want to override then add it
Usage
including PushManager
If added in alias then use it in controller
IF not added in alias then use it in controller
dependency injection in controller constructor
If want to use without injecting then
Example
To change response
PushManager::STDCLASS
, PushManager::ARRY
, PushManager::RAW
by default response is PushManager::RAW
set
Error Handle
===============
and
Future Enhancement
======================
Now only raw response works proper. Json and stdClas response doesn't work for all types of fcm response. Returns null if failed to make json decode.
I will make the send push notification send asynchronous so that no wait for the response