Download the PHP package saverty/firebase-notification without Composer
On this page you can find all versions of the php package saverty/firebase-notification. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download saverty/firebase-notification
More information about saverty/firebase-notification
Files in saverty/firebase-notification
Download saverty/firebase-notification
More information about saverty/firebase-notification
Files in saverty/firebase-notification
Vendor saverty
Package firebase-notification
Short Description Send Firebase Notification
License MIT
Homepage https://github.com/saverty/firebase-notification
Package firebase-notification
Short Description Send Firebase Notification
License MIT
Homepage https://github.com/saverty/firebase-notification
Keywords savertyfirebase-notification
Please rate this library. Is it a good library?
Informations about the package firebase-notification
Laravel Firebase Notification
Send notification using Firebase and Laravel
Download the package using composer
composer require ...
Add the package in app.php
"providers" => [
"Saverty/FirebaseNotification::class"
]
Publish the package
php artisan vendor publish
Edit config/firebase-notification.php
//Add entities you want to notify
return [
'tables' => ['users', '...']
];
Run the migrations
php artisan migrate
Add the Trait in the model
use Saverty\FirebaseNotification\FirebaseNotificationTrait;
class User extends Authenticatable{
use FirebaseNotificationTrait;
{
use Notifiable;
use FirebaseNotificationTrait;
Features
Set the FCM Token
$user = Auth::user();
$user->setFcmToken('token');
Send notification to a specific user
$user = Auth::user();
$user->sendFirebaseNotification('title', 'This is the body', ['data' => 'this is an example'], 'https://google.fr);
Send notification to many users
$users = User::all();
FirebaseNotification::sendTo($users,'title', 'This is the body', [], null)All versions of firebase-notification with dependencies
PHP Build Version
Package Version
The package saverty/firebase-notification contains the following files
Loading the files please wait ...