F
Filament9mo ago
nowak

Understanding the DatabaseNotificationsSent event. Not seeing websocket notifications in admin panel

I have Echo and Soketi running for real time notifications, where I want to dispatch filaments built in DatabaseNotificationsSent event. Since I want to use this with export actions, I quickly added the DatabaseNotificationsSent event to the bottom of the /actions/src/Exports/Jobs/ExportCompletion.php handler to test:
event(new DatabaseNotificationsSent($this->export->user));
event(new DatabaseNotificationsSent($this->export->user));
The event seems to be dispatched correctly, as I see this in my soketi docker logs:
meinRad_soketi_server | [Wed Apr 03 2024 12:11:54 GMT+0000 (Coordinated Universal Time)] :zap: HTTP Payload received
meinRad_soketi_server | {
meinRad_soketi_server | name: 'database-notifications.sent',
meinRad_soketi_server | data: '{"user":{"id":2,"name":"k","email":"[email protected]","email_verified_at":"2024-04-03T11:36:01.000000Z","created_at":"2024-04-02T12:07:57.000000Z","updated_at":"2024-04-02T12:07:57.000000Z","last_name":"n","phone_number":"0792345678","address":"Kapellplatz 2","latitude":47.0501,"longitude":8.3103,"road":"Kapellplatz","house_number":"2","postal_code":"6004","city":"Lucerne","country":"Switzerland","current_group_id":2}}',
meinRad_soketi_server | channel: 'private-App.Models.User.2'
meinRad_soketi_server | }
meinRad_soketi_server | [Wed Apr 03 2024 12:11:54 GMT+0000 (Coordinated Universal Time)] :zap: HTTP Payload received
meinRad_soketi_server | {
meinRad_soketi_server | name: 'database-notifications.sent',
meinRad_soketi_server | data: '{"user":{"id":2,"name":"k","email":"[email protected]","email_verified_at":"2024-04-03T11:36:01.000000Z","created_at":"2024-04-02T12:07:57.000000Z","updated_at":"2024-04-02T12:07:57.000000Z","last_name":"n","phone_number":"0792345678","address":"Kapellplatz 2","latitude":47.0501,"longitude":8.3103,"road":"Kapellplatz","house_number":"2","postal_code":"6004","city":"Lucerne","country":"Switzerland","current_group_id":2}}',
meinRad_soketi_server | channel: 'private-App.Models.User.2'
meinRad_soketi_server | }
But I do not see any websocket notification in the filament panel after this is triggered. Do I need to add any other configurations or setup something else, other than what is needed for database notifications? I see the "Export Completed" database notifications in the notification tray, so that works. Maybe I misunderstood something, should DatabaseNotificationsSent not result in a notification in the UI?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server