© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
2 replies
ocram82

Database notification error Broadcasting [database-notifications.sent] on channels

Hi, every time i dispatch a job that has this code:

$agency = User::findOrFail($this->userId);

$agency->notify(
            Notification::make()
                ->success()
                ->title('PDF created!')
                ->body('<a href="'.Storage::url($filename).'" target="_blank" style="text-decoration: none; font-weight:bold; color: green">Download .pdf</a>')
                ->toDatabase(),
        );
$agency = User::findOrFail($this->userId);

$agency->notify(
            Notification::make()
                ->success()
                ->title('PDF created!')
                ->body('<a href="'.Storage::url($filename).'" target="_blank" style="text-decoration: none; font-weight:bold; color: green">Download .pdf</a>')
                ->toDatabase(),
        );


I obtain a 500 error in log file like this:

[2024-09-18 14:33:41] production.INFO: Broadcasting [database-notifications.sent] on channels [private-App.Models.User.3] with payload:
{
    "user": {
        "id": 3,
        "profile_img_id": null,
        "first_name": "John",
        "last_name": "Doe",
        "rag_sociale": "JohnDoe SRL",
        "email": "johndoe@example.com",
        "email_verified_at": "2024-08-07 12:53:40",
        "is_active": "2024-08-08 20:00:01",
        "privacy_accepted_at": "2024-08-07 19:33:29",
        "casting_country": null,
        "phone_prefix": 39,
        "phone": 12345678,
        "nationality": null,
        "birth_city": null,
        "birth_date": null,
        "fiscal_code": null,
        "created_at": "2024-08-07 12:53:08",
        "updated_at": "2024-08-08 20:00:01"
    },
    "socket": null
}  
[2024-09-18 14:33:41] production.INFO: Broadcasting [database-notifications.sent] on channels [private-App.Models.User.3] with payload:
{
    "user": {
        "id": 3,
        "profile_img_id": null,
        "first_name": "John",
        "last_name": "Doe",
        "rag_sociale": "JohnDoe SRL",
        "email": "johndoe@example.com",
        "email_verified_at": "2024-08-07 12:53:40",
        "is_active": "2024-08-08 20:00:01",
        "privacy_accepted_at": "2024-08-07 19:33:29",
        "casting_country": null,
        "phone_prefix": 39,
        "phone": 12345678,
        "nationality": null,
        "birth_city": null,
        "birth_date": null,
        "fiscal_code": null,
        "created_at": "2024-08-07 12:53:08",
        "updated_at": "2024-08-08 20:00:01"
    },
    "socket": null
}  

In the panel provider i've this:

...
            ->databaseNotifications()
            ->databaseNotificationsPolling('15s')
...
...
            ->databaseNotifications()
            ->databaseNotificationsPolling('15s')
...


and in the
.env
.env
the variabile
QUEUE_CONNECTION=redis
QUEUE_CONNECTION=redis


what's wrong on this?
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Notification Broadcasting Help
FilamentFFilament / ❓┊help
3y ago
Notification broadcasting with an observer on create
FilamentFFilament / ❓┊help
3y ago
Notification sent twice
FilamentFFilament / ❓┊help
9mo ago
Database Notifications on Vapor
FilamentFFilament / ❓┊help
2y ago