Since laravel is to handle the server side, you need to handle getting the permissions for the notifications on the client side. follow the setup steps here https://documentation.onesignal.com/docs/web-push-typical-setup
Dec 26, 2019
3
Level 5
Onesignal integration with laravel for web push notifications.
I have laravel website where i want to integrate onesignal push notifications. once the user opens the website it should ask for subscribe to allow for notifications then it will store user tokens in one signal dashboard. I just need to integrate a subscription channel where users subscribe for notifications by clicking allow.
I have installed below library,
https://github.com/berkayk/laravel-onesignal
but it provides the documentation only for already subscribed users. please help me out how to ask user to allow for notifications in laravel.
Please or to participate in this conversation.