Laravel Echo not working: Receiving Database Notifications via Websockets
Trying to set up echo/pusher to receiving notifications on the admin panel as described here:
https://filamentphp.com/docs/3.x/notifications/database-notifications#using-echo-to-receive-new-database-notifications-with-websockets
Added the
Installed Laravel Echo both server side and admin side:
Set up my env variables to send to Pusher. Pusher dashboard shows that, yes it does receive the messages, the little chart does increase over time. But the
Honestly this just might be me being a little tired at this time of the night.
Did a little bit of source diving on the notification blade code and decided to try this on the browser's console:
Result:
What do I need to do?
https://filamentphp.com/docs/3.x/notifications/database-notifications#using-echo-to-receive-new-database-notifications-with-websockets
Added the
databaseNotifications() method to the AdminPanelProvider, as well as set databaseNotificationsPolling() to null for good measure.Installed Laravel Echo both server side and admin side:
npm install --save-dev laravel-echo pusher-jscomposer require pusher/pusher-php-serverSet up my env variables to send to Pusher. Pusher dashboard shows that, yes it does receive the messages, the little chart does increase over time. But the
Clients Connected is stuck at 0. Honestly this just might be me being a little tired at this time of the night.
Did a little bit of source diving on the notification blade code and decided to try this on the browser's console:
window.dispatchEvent(new CustomEvent('EchoLoaded'))Result:
TypeError: window.Echo is undefinedWhat do I need to do?