Download the PHP package heyharpreetsingh/fcm without Composer
On this page you can find all versions of the php package heyharpreetsingh/fcm. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download heyharpreetsingh/fcm
More information about heyharpreetsingh/fcm
Files in heyharpreetsingh/fcm
Package fcm
Short Description Laravel package to send push notification on mobile(android, ios), and web using Firebase Cloud Messaging.
License MIT
Informations about the package fcm
Push notification using FCM (Firebase Cloud Messaging)
Description
Send a push notification to user mobile, and web using FCM (Firebase Cloud Messaging).
Installing via Composer
Next, Register the service provider in file bootstrap/providers.php
for L11 AND config/app.php
in the providers
key for l10
Next, Generate new private key from your Firebase:
In order to get this file, let’s go to your Firebase projects page, then select your project and as shown below, go to Project Settings
.
Click on the Service accounts
tab, then Generate new private key.
A file named
⚠️ Your file can be generated only 1 time, if you create a new key, it will be a different one. Although, your previous key/file will still working until you decide to delete it (click on Manage service account permissions).
Next, Put your ServiceAccount.json
file in your project storage directory and add the name of json file in your project .env
file:
Send a push notification on mobile(android, ios), and web.
use a FCMFacade
to send a notification
You can pass additional data using the official doc of FCM.
- https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages/send
- https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#Message
If you have any issue or suggestion feel free to contact.
License
Open-sourced software licensed under the MIT license.