Download the PHP package viipers/fcm-notif-laravel without Composer
On this page you can find all versions of the php package viipers/fcm-notif-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download viipers/fcm-notif-laravel
More information about viipers/fcm-notif-laravel
Files in viipers/fcm-notif-laravel
Package fcm-notif-laravel
Short Description Laravel FCM (Firebase Cloud Messaging) Notification Channel
License MIT
Informations about the package fcm-notif-laravel
Laravel FCM Notification
Laravel FCM (Firebase Cloud Messaging) Notification Channel
Use this package to send push notifications via Laravel to Firebase Cloud Messaging. Laravel 5.5+ required.
This package works only with Legacy HTTP Server Protocol
Install
This package can be installed through Composer.
Add your Firebase API Key in config/services.php
.
Example Usage
Use Artisan to create a notification:
Return [fcm]
in the public function via($notifiable)
method of your notification:
Add the method public function toFcm($notifiable)
to your notification, and return an instance of FcmMessage
:
When sending to specific device, make sure your notifiable entity has routeNotificationForFcm
method defined:
When sending to a topic, you may define so within the toFcm
method in the notification:
Or when sending with a condition:
You may provide optional headers or override the request headers using setHeaders()
:
Interpreting a Response
To process any laravel notification channel response check Laravel Notification Events
This channel return a json array response:
Check FCM Legacy HTTP Server Protocol for response interpreting documentation.
License
The MIT License (MIT). Please see License File for more information.
All versions of fcm-notif-laravel with dependencies
guzzlehttp/guzzle Version *
illuminate/notifications Version *
illuminate/queue Version *
illuminate/support Version *
illuminate/config Version *