XM
xmhafiz/laravel-fcm-realtime
"Near Realtime Webapp" using Laravel + Firebase cloud messaging js
Laravel + FCM Example
This project purposely created for Laratalk #5 on Real-time Webapp using JavaScript Firebase Cloud Messaging API. Refer the Preseentation here
It is basically a simple report monitoring with maps. So, user will submit the report and the page will autmatically updated.
Requirement
- PHP 5.6.4+ for Laravel 5.4
- WebPush API only working on Chrome: 50+, Firefox: 44+, Opera Mobile: 37+ (supports Service worker)
Setup
- Run
composer install - Copy
env.exampleto.envand add your DB details - Migrate database
php artisan migrate - Go to Firebase Console and add new project
- Click on Setting icon > Project Setting > Cloud Message and copy the
Legacy server keyto be added in .env asFIREBASE_KEY. Also updatemessagingSenderIdinpublic/firebase-messaging-sw.js - Now you are ready to Go!. Take a look at route
/for simulating Realtime Dashboard Report and/report/submitto add new report.
Todo
- Js code refactor
- Implement tests
License
This project is licensed under the MIT license.
On this page
Languages
PHP81.6%HTML17.2%Vue0.6%ApacheConf0.6%
Contributors
Created May 17, 2017
Updated June 11, 2021