Download the PHP package meeeet-dev/larafirebase without Composer
On this page you can find all versions of the php package meeeet-dev/larafirebase. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download meeeet-dev/larafirebase
More information about meeeet-dev/larafirebase
Files in meeeet-dev/larafirebase
Package larafirebase
Short Description Laravel Firebase Cloud Messaging (Larafirebase) with HTTP v1.
License MIT
Homepage https://github.com/meeeet-dev/larafirebase
Informations about the package larafirebase
Introduction
Larafirebase is a package thats offers you to send push notifications via Firebase in Laravel.
Firebase Cloud Messaging (FCM) is a cross-platform messaging solution that lets you reliably deliver messages at no cost.
For use cases such as instant messaging, a message can transfer a payload of up to 4KB to a client app.
Installation
Follow the steps below to install the package.
Install via Composer
Copy Configuration
Run the following command to publish the larafirebase.php
config file:
Configure larafirebase.php as needed
Open the larafirebase.php
configuration file, which you just published, and set the following values as needed:
project_id
: Replace with your actual Firebase project ID.firebase_credentials
: This refers to the JSON credentials file for your Firebase project. Make sure it points to the correct location in your project. This JSON file contains the authentication information for your Firebase project, allowing your Laravel application to interact with Firebase services. You can generate this JSON file in the Firebase Console. Once you have it, specify its path in this configuration.
Usage
Follow the steps below to find how to use the package.
Example usage in any class you want to use Larafirebase:
Example usage in Notification class:
Tips
- You can use
larafirebase()
helper instead of Facade.
Payload
Check how is formed payload to send to firebase:
Example 1:
Example 2:
If you want to create payload from scratch you can use method fromRaw
, for example:
Made with ♥ by Meeeet Dev (@meeeet-dev).
All versions of larafirebase with dependencies
illuminate/notifications Version ^7.0|^8.0|^9.0|^10.0|^11.0
google/apiclient Version ^2.12