{"repo":"laravel-notification-channels/fcm","free":true,"listed":false,"github":"https://github.com/laravel-notification-channels/fcm","clone":"git clone https://github.com/laravel-notification-channels/fcm.git","description":"Firebase Cloud Messaging (FCM) notifications channel for Laravel","language":"PHP","stars":605,"topics":["notification-channel","fcm","firebase-cloud-messaging","notification-icon","firebase","android","laravel"],"license":"MIT","category":"mobile-apps","readme_excerpt":"Laravel FCM (Firebase Cloud Messaging) Notification Channel This package makes it easy to send notifications using Firebase Cloud Messaging (FCM) with Laravel. Contents - Installation - Setting up the FCM service - Usage - Available message methods - Topic notifications - Custom clients - Handling errors - Changelog - Testing - Security - Contributing - Credits - License Installation Install this package with Composer: Setting up the FCM service This package now uses the laravel-firebase library to authenticate and make the API calls to Firebase. Follow the configuration steps specified in their readme before using this. After following their configuration steps, make sure that you've specified your FIREBASE CREDENTIALS in your .env file. Usage After setting up your Firebase credentials, you can now send notifications via FCM by a Notification class and sending it via the FcmChannel::class . Here is an example: You will have to set a routeNotificationForFcm() method in your notifiable model. This method should return the user's FCM token(s) from storage. For example: You can also return an array of tokens to send notifications via multicast to different user devices. Once you have that in place, you can simply send a notification to the user by doing the following: Available Message methods View the FcmMessage source for the complete list of options. Topic notifications You can also send FCM notifications to topics with the FcmTopicChannel . Use an on-demand notification to t","default_branch":null,"files":null,"tree":[],"storefront":"/r/laravel-notification-channels","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/laravel-notification-channels/fcm/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}