Download the PHP package medianet-dev/cloud-message without Composer
On this page you can find all versions of the php package medianet-dev/cloud-message. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download medianet-dev/cloud-message
More information about medianet-dev/cloud-message
Files in medianet-dev/cloud-message
Package cloud-message
Short Description A Laravel package for sending Firebase and Huawei notifications.
License MIT
Homepage https://github.com/medianet-dev/cloud-message
Informations about the package cloud-message
Cloud Message
Cloud Message is a Laravel package that provides a simple and unified way to send push notifications using Firebase Cloud Messaging (FCM) and Huawei Push Kit.
Features
- Send push notifications via Firebase Cloud Messaging (FCM)
- Send push notifications via Huawei Push Kit
- Unified API for both FCM and Huawei
- Easy to use Facade
- Customizable configuration
- Robust error handling
Requirements
- PHP 7.3+
- Laravel 7.0+
Installation
You can install the package via composer:
Configuration
After installation, publish the config file:
This will create a config/cloud_message.php
file in your app's configuration directory. Here you can set your Firebase and Huawei credentials.
Usage
Using the Facade
You can use the CloudMessage
facade to send notifications:
Using the FirebaseNotification Class Directly
You can also use the FirebaseNotification
class directly:
Subscribe to a Topic
This will subscribe the provided tokens to receive notifications for the given topic.
Unsubscribe to a Topic
Removes the subscription of the tokens from the given topic.
Configuration for Asynchronous Requests
For performance optimizations when sending notifications to large numbers of tokens, the package supports asynchronous multi-token requests.
To enable this feature, configure the async_requests
option in the config file:
You will need to ensure your queue worker is running to process these asynchronous jobs. From the command line, run: php artisan queue:work
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Adel Stiti
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of cloud-message with dependencies
illuminate/support Version ^7.0|^8.0|^9.0|^10.0|^11.0
google/apiclient Version ^2.12