Download the PHP package akhelij/larabase-notification without Composer
On this page you can find all versions of the php package akhelij/larabase-notification. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download akhelij/larabase-notification
More information about akhelij/larabase-notification
Files in akhelij/larabase-notification
Package larabase-notification
Short Description Larabase Notification is a powerful Laravel package for handling push notifications via Firebase Cloud Messaging (FCM). It simplifies the process of sending notifications to Android, iOS, and web applications, leveraging Firebase's real-time capabilities. With minimal setup, Larabase Notification provides a streamlined interface to send device-specific, topic-based, or condition-based notifications directly from your Laravel application.
License MIT
Homepage https://github.com/akhelij/larabase-notification
Informations about the package larabase-notification
LarabaseNotification
LarabaseNotification is a Laravel package that enables you to send Firebase Cloud Messaging (FCM) notifications using Laravel's notification system. It integrates seamlessly with Laravel, allowing you to send push notifications to your users via FCM with ease.
Features
- Laravel Notification Channel: Uses Laravel's notification system with a custom channel.
- Firebase HTTP v1 API: Utilizes the latest Firebase Cloud Messaging API.
- Device Token Management: Send notifications to specific device tokens.
- Customizable Payloads: Add additional data to your notifications.
- Queue Support: Notifications can be queued using Laravel's queue system.
Requirements
- PHP: 7.4 or higher
- Laravel: 7.x or higher
- Firebase Project: A Firebase project with a service account JSON file
Installation
Install the package via Composer:
Configuration
1. Publish the Configuration File
Publish the package configuration file using Artisan:
This will create a config/larabase-notification.php
file in your Laravel application.
2. Set Up Firebase Credentials
Update the config/larabase-notification.php
file with your Firebase project details:
3. Set Environment Variables
In your .env
file, add the following entries:
- FIREBASE_PROJECT_ID: Your Firebase project ID.
- FIREBASE_SERVICE_ACCOUNT_FILE: The absolute path to your Firebase service account JSON file.
Note: Ensure the service account JSON file is kept secure and not committed to version control.
Usage
1. Create a Notification Class
Generate a new notification class:
2. Update the Notification Class
Modify the generated notification class to use the LarabaseNotification package:
3. Send the Notification
You can now send the notification to a user:
License
This package is open-sourced software licensed under the MIT license.
Contact
For questions or support, please open an issue on the GitHub repository.