Download the PHP package finnwiel/shazzoo-notify without Composer
On this page you can find all versions of the php package finnwiel/shazzoo-notify. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download finnwiel/shazzoo-notify
More information about finnwiel/shazzoo-notify
Files in finnwiel/shazzoo-notify
Package shazzoo-notify
Short Description A Laravel Package for shazzoo notifications
License MIT
Informations about the package shazzoo-notify
Shazzoo Mobile Notifications
A Laravel package to manage Expo push notifications with per-device preferences for the Shazzoo mobile app.
Features
- Send push notification to registered phones.
- Send notifications to registered pc's.
- Per device preferences for notification's.
Installation
Publish the migrations
Ensure the Laravel API and broadcasting stack are installed:
Make sure to add the HasApiTokens
to the user
model.
Also check if your .env
file contains the correct settings for reverb.
Usage
Authentication
In the mobile app you can login with any user that has a profile on your laravel website. This package then stores the Expo token in a database together with the device type. This expo token is needed to send notifications.
For the desktop app you can also login using a profile that is registered in your app. This wil set a uuid to identify the pc and also set the device type to desktop.
Upon login your prefrences will all be set to enabled
, if you want to disable them you will need to do so in the mobile app.
Sending Notifications
The notifications to desktop are sent via a websocket connection. So make sure to start reverb.
- Use the provided Artisan command to send notifications:
The command also accepts some tags:
Tag | Description |
---|---|
--user= |
Takes in the email or id of a user |
--type= |
Sets the type of notificaition you want to send. |
--title= |
Sets the title of the notification |
--body= |
Sets the body of the notification |
Notification Types
You can define your own notification types. This package provides a notification_types
table, where each type includes:
- A unique name
- A description
These types help organize and filter which notifications are sent and managed.
Queue
By default laravel uses a queue to send the events, so you will have to run:
If you dont want the notifications to be sent on a queue you can set the QUEUE_CONNECTION
to sync in the .env
file.
License
This package is open-sourced software licensed under the MIT license.
All versions of shazzoo-notify with dependencies
illuminate/support Version ^9.0|^10.0|^11.0|^12.0
spatie/laravel-package-tools Version ^1.92
laravel/reverb Version ^1.0