🔔Notifications
Last updated
Last updated
we are build a full notification system for you with multi provider like mail
, firebase
, pusher
, discord
, slack
, messagebird
and open the way to add more all of this working on queue and have a lot of helpers to make it easy to use this notification on your system
Add Module to modules_statuses.json
if not exists
to install the notification's plugin by run this command
it will generate roles and permissions for notifications
after that we must get a firebase service file and attach the path to FIREBASE_CREDENTIALS
on .env
and generate a firebase database and set the url to FIREBASE_DATABASE_URL
on .env
to connect the firebase for realtime actions
Make a migration
Publish Assets
OR
to setup any model to get notification you must add our trait to handel that model
and you must set the settings for FCM
to get realtime notification
the notification is run on queue, so you must run the queue worker to send the notifications
to create a new template you can use template CRUD and make sure that the template key is unique because you will use it on every single notifications.
to send a notification you must use our helper SendNotification::class
like
where $template
is select of template by key and $matchesTitle
and $matchesBody
is array of matches to replace on the template and $titleFill
and $titleBody
is array of values to replace the matches