Download the PHP package bilalmardini/firebase-notification without Composer
On this page you can find all versions of the php package bilalmardini/firebase-notification. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bilalmardini/firebase-notification
More information about bilalmardini/firebase-notification
Files in bilalmardini/firebase-notification
Package firebase-notification
Short Description Laravel Firebase Notification is a robust and user-friendly package designed to integrate Firebase Cloud Messaging (FCM) with Laravel applications. This package streamlines the process of sending notifications to users through Firebase, supporting various notification targeting options and customization features.
License MIT
Informations about the package firebase-notification
Laravel Firebase Notification
Overview
Laravel Firebase Notification is a powerful package for integrating Firebase Cloud Messaging (FCM) into Laravel applications. It provides an intuitive interface for sending push notifications to users, targeting individuals, groups, or topics for broadcast notifications.
Features
- Push Notifications: Send notifications via Firebase Cloud Messaging (FCM).
- Topic-Based Notifications: Broadcast messages to subscribers.
- User-Specific Notifications: Send personalized messages.
- Custom Payloads: Include icons, titles, bodies, and additional data.
- Rich Media Support: Customizable message structure with deep linking.
- Secure Delivery: Authentication with Firebase using a service account key.
Requirements
- PHP: 7.4 or higher
- Laravel: 8.x or higher
- Firebase: A project with Cloud Messaging enabled
- Credentials: Firebase Service Account credentials
Installation
Install the package via Composer:
If you are not using Laravel package auto-discovery, add the service provider in config/app.php
:
Publish the configuration file to set up your Firebase credentials:
Configuration
Set your Firebase credentials in the published configuration file (config/firebase.php
):
Usage
Sending a Notification
1. Topic-Based Notification (Global News Update)
Send a notification to all users subscribed to a specific topic:
Key Points:
- Sends notifications to users subscribed to the
global-news
topic. - Includes custom data such as
news_id
andcategory
.
2. User-Specific Notification (Order Status)
Notify specific users about their order status:
Key Points:
- Sends notifications to users eligible for a promotional offer (
is_eligible_for_promo
). - Includes custom data like
promo_code
anddiscount
.
Models
Notification Model
UserNotification Model
UserFcmToken Model
Contact
If you have any questions or need further assistance, you can reach out through the following channels:
- GitHub Issues: Submit an issue for bug reports, feature requests, or general questions.
- Email: For direct inquiries, you can contact us at [email protected].
We appreciate your interest in our project and your contributions. Thank you for being a part of the Laravel Firebase Notification community!