Download the PHP package zein-api/firebase-notification without Composer
On this page you can find all versions of the php package zein-api/firebase-notification. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zein-api/firebase-notification
More information about zein-api/firebase-notification
Files in zein-api/firebase-notification
Package firebase-notification
Short Description A powerful Firebase notification system by Zein Rawad Ahmad
License MIT
Informations about the package firebase-notification
ZeinApi Firebase Notification
A powerful Firebase notification system created by Zein Rawad Ahmad.
Installation
Add the package to your Laravel project:
Publish the configuration file:
Run the migrations:
Configuration
1. Add Service Provider
Add the service provider to your config/app.php
:
2. Configure Environment Variables
Add these variables to your .env
file:
3. Add Trait to User Model
Add the HasNotifications trait to your User model:
4. Configure Package Settings
The package configuration file (config/firebase-notification.php
) allows you to customize:
- Firebase credentials path
- Application name and icon
- Supported languages
- User model class
- FCM token model class
Usage
Register FCM Token
When a user logs in from a device, register their FCM token:
Send Notification
Get User's Notifications
Mark Notifications as Read
Test Notification
Translation
Add your notification messages to your translation files:
Troubleshooting
If you get the error "Use of unknown class: 'ZeinApi\FirebaseNotification\Traits\HasNotifications'", make sure:
-
The package is properly installed:
-
The service provider is registered in
config/app.php
: -
Run composer dump-autoload:
- Clear Laravel's configuration cache:
Author
Zein Rawad Ahmad Email: [email protected]
All versions of firebase-notification with dependencies
kreait/laravel-firebase Version ^5.0
illuminate/support Version ^10.0