Is there a way to send Database notifications from Job?
I read about Broadcast notifications and that they can be used to send notifications from job, but I was wondering if there is a way to accomplish that without Broadcast notifications? Like with Database notifications that get fetched?
5 Replies
->sendToDatabase() ?
Just call the notification class no?
No, the notification is added to the database, but not displayed, unless I refresh the page. I waited for a way more than the polling time, but so far it appears only if I refresh the page.
It will show again if the notifications are polling but it’s not instant like a push, you need another method for refreshing the. Notifications on a webhook type request I believe for that
In the config I have:
But I noticed that they appear in like 30-50 minutes, not seconds. Maybe be I've misconfigured something, or did not set something that I should have.
The problem is that we don't want to setup a server for Laravel Echo/Pusher.
No that lookss good
Try reducing it down to 5s and purge cache and monitor the brower for the network requests