Download the PHP package trin4ik/laravel-expo-push without Composer
On this page you can find all versions of the php package trin4ik/laravel-expo-push. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download trin4ik/laravel-expo-push
More information about trin4ik/laravel-expo-push
Files in trin4ik/laravel-expo-push
Package laravel-expo-push
Short Description Laravel Expo Push Notification
License MIT
Homepage https://github.com/trin4ik/laravel-expo-push
Informations about the package laravel-expo-push
Laravel Expo Push Notification Channel
Simple and stupid package for send push notification with expo-notification service. \ No tests, no mans, no routes/controllers for get tokens from clients etc. Only channel. \ If u need more, use Alymosul/laravel-exponent-push-notifications
Installation
U can log query to expo notification service into database with payloads and responses.
Users expo tokens
U need add method routeNotificationForExpoPush
any model, like User
, who return expo token
Change log database
By default, log write to expo_push_notification
table, u can change it in 2 step:
-
extends
Trin4ik\LaravelExpoPush\Models\ExpoPushNotification.php
like: - change in
config/expo-push.php
log/driver/instance
to your new model:
Usage
Like other channels, u need create Notification
for more information about
ExpoPush::create
methods, look down
And usage like:
ExpoPush::create
methods
Method | Type | Default | Platform | Description |
---|---|---|---|---|
data | array |
null |
iOS & Android | Any data to your app on click to push notification. Array converted to JSON, JSON may be up to about 4KiB |
title | string |
null |
iOS & Android | Notification title |
body | string |
null |
iOS & Android | Notification text |
ttl | int |
Android: 2419200 iOS: 0 |
iOS & Android | TimeToLive, in seconds. Need to redelivery push |
expiration | int |
null |
iOS & Android | Timestamp to expires message. Like ttl , but other format. ttl takes precedence over expiration |
priority | enum(default, normal, high) |
default |
iOS & Android | Delivery priority |
categoryId | string |
null |
iOS & Android | ID of the notification category that this notification is associated with. Find out more about notification categories here. Must be on at least SDK 41 or bare workflow |
subtitle | string |
null |
iOS Only | Notification subtitle |
sound | bool |
true |
iOS Only | Play sound when the recipient receives this notification |
badge | int |
null |
iOS Only | Number to display in the badge on the app icon. Specify zero to clear the badge |
mutableContent | bool |
null |
iOS Only | Specifies whether this notification can be intercepted by the client app. In Expo Go, this defaults to true , and if you change that to false , you may experience issues. In standalone and bare apps, this defaults to false |
channelId | string |
null |
Android Only | ID of the Notification Channel through which to display this notification. If an ID is specified but the corresponding channel does not exist on the device (i.e. has not yet been created by your app), the notification will not be displayed to the user |
More info on Expo notification service message format
If new SDK release new format, u can create PR or use toArray()
method in your Notification, like:
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
- trin4ik
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
Thanks
❤️ This package was generated using the Laravel Package Boilerplate. \ ❤️ More code spizjeno from Alymosul/laravel-exponent-push-notifications