Download the PHP package katsana/fcm-notification without Composer
On this page you can find all versions of the php package katsana/fcm-notification. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download katsana/fcm-notification
More information about katsana/fcm-notification
Files in katsana/fcm-notification
Package fcm-notification
Short Description Firebase Cloud Messaging (FCM) Notification Channel for Laravel
License MIT
Homepage https://github.com/katsana/fcm-notification
Informations about the package fcm-notification
Firebase Cloud Messaging (FCM) Notification Channel for Laravel
This package makes it easy to send notifications using Firebase Cloud Messaging with Laravel 6.0+ using kreait/laravel-firebase
Installation
FCM Notification can be installed via composer:
Configuration
This part is based on Firebase for Laravel Configuration
In order to access a Firebase project and its related services using a server SDK, requests must be authenticated. For server-to-server communication this is done with a Service Account.
The package uses auto discovery to find the credentials needed for authenticating requests to the Firebase APIs by inspecting certain environment variables and looking into Google's well known path(s).
If you don't already have generated a Service Account, you can do so by following the instructions from the official documentation pages at https://firebase.google.com/docs/admin/setup#initialize_the_sdk.
Once you have downloaded the Service Account JSON file, you can use it to configure the package by specifying the environment variable FIREBASE_CREDENTIALS
in your .env
file:
For further configuration, please see config/firebase.php
. You can modify the configuration by copying it to your local config directory with the publish command:
Usages
If a notification supports being sent as an FCM, you should define a toFcm
method on the notification class. This method will receive a $notifiable entity and should return a NotificationChannels\Fcm\Message
instance:
Routing FCM Notifications
When sending notifications via the fcm
channel, the notification system will automatically look for routeNotificationForFcm
method on the entity:
All versions of fcm-notification with dependencies
kreait/laravel-firebase Version ^1.2 || ^2.0
illuminate/notifications Version ^6.0 || ^7.0
illuminate/support Version ^6.5.2 || ^7.0