Adds FCM to Contao 4
Adds the ability to send notifications from the Contao backend to Clients how have allowed the browser to receive notifications via FCM.
composer require home/pushee-bundle
/contao/install and update your database.
- Create a new
FCM - PusheeFrontend-Module and fill in your Firebase configuration and Cloud Messaging server key.
- Add the created Module to the
theme. Now clients will be prompt to enable push notifications.
- To Send a push message, navigate to the
Push Benachrichtigungsection of the content area.
- Enter a message
- The message will then be send to all clients how have enabled to receive notifications.
If someone enables notifications there client_id will be saved in the contao database.
After sending a push notification the result will be processed and client_id's that are no valid will be removed.
Sending push notifications is not possible when there are no clients registered, or the FCM server key is missing.