Download the PHP package firegon/laravel-expo-notifier without Composer
On this page you can find all versions of the php package firegon/laravel-expo-notifier. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download firegon/laravel-expo-notifier
More information about firegon/laravel-expo-notifier
Files in firegon/laravel-expo-notifier
Package laravel-expo-notifier
Short Description Easily send Expo notifications with Laravel.
License MIT
Homepage https://github.com/LucasSch2410/laravel-expo-notifier
Informations about the package laravel-expo-notifier
laravel-expo-notifier
Easily manage Expo notifications with Laravel. Support batched notifications.
Major version zero (0.y.z) is for initial development. Anything MAY change at any time. The public API SHOULD NOT be considered stable.
Installation
composer require yieldstudio/laravel-expo-notifier
Configure
You must publish the configuration file with:
Available environment variables
EXPO_PUSH_NOTIFICATIONS_PER_REQUEST_LIMIT
: sets the max notifications sent on a bulk request. The official documentation says the limit should be 100 but in fact it's failing. You can tweak it by setting a value under 100.EXPO_NOTIFICATIONS_ACCESS_TOKEN
: sets the Expo access token used to send notifications with an additional layer of security. You can get your access token from your Expo dashboard.
Usage
Add relation for notifiable class
In order to use Notification, you need to declare the relation expoTokens
on your Notifiable class.
Two Trait are available to help you :
HasUniqueExpoToken
if your notifiable class can have only one expo tokenHasManyExpoToken
if your notifiable class can have many expo token
Send notification
Commands usage
Send database pending notifications
Clean sent notification from database
Clean tickets from outdated tokens
You may create schedules to execute these commands.
Batch support
You can send notification in the next batch :
Don't forget to schedule the expo:notifications:send
command.
Unit tests
To run the tests, just run composer install
and composer test
.
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you've found a bug regarding security please mail [email protected] instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-expo-notifier with dependencies
illuminate/database Version ^9.0|^10.0|^11.0|^12.0
illuminate/support Version ^9.0|^10.0|^11.0|^12.0
nesbot/carbon Version >=2.62.1