Laravel 11 Filament 3 database notification help

Hello)) i want use database notification. I see filament notification and made id. but notifications not set in the db. Not error return but not working((
19 Replies
S.V Gubadov
S.V Gubadov3mo ago
Yeah. I want example user create order. Admin see the notification on Admin panel)) sorry my english
Majid Al Zariey
Majid Al Zariey3mo ago
First check whether the notification database is available
S.V Gubadov
S.V Gubadov3mo ago
yes. notifications table exsist. My Laravel notification is working. But Filament Notification not send the notification in db $user->notify( Notification::make() ->title('Saved successfully') ->toDatabase(), );
Majid Al Zariey
Majid Al Zariey3mo ago
try this format
\Filament\Notifications\Notification::make()
->title($title)
->body($textMessage)
->seconds(300)
->info()
->sendToDatabase($users)->send()
\Filament\Notifications\Notification::make()
->title($title)
->body($textMessage)
->seconds(300)
->info()
->sendToDatabase($users)->send()
S.V Gubadov
S.V Gubadov3mo ago
Not working. Notification not created((
S.V Gubadov
S.V Gubadov3mo ago
No description
Majid Al Zariey
Majid Al Zariey3mo ago
and the Panel?
S.V Gubadov
S.V Gubadov3mo ago
Yes
No description
S.V Gubadov
S.V Gubadov3mo ago
I read the filament notofcation documentatin and made it. But not working
Majid Al Zariey
Majid Al Zariey3mo ago
is the icon showing?
No description
Majid Al Zariey
Majid Al Zariey3mo ago
and are there any record in the notification Table
S.V Gubadov
S.V Gubadov3mo ago
yes
No description
S.V Gubadov
S.V Gubadov3mo ago
Notification not added the table(( i run this code \Filament\Notifications\Notification::make() ->title('Test') ->body('Test body') ->seconds(1) ->info() ->sendToDatabase($user)->send(); but not writen data on the table
Majid Al Zariey
Majid Al Zariey3mo ago
are there any console issues? wait, from where are you running the notification? and can you dd($user)
Dennis Koch
Dennis Koch3mo ago
Are the notifications queued and you aren't running the queue worker?
S.V Gubadov
S.V Gubadov3mo ago
No. i not user queue use
Dennis Koch
Dennis Koch3mo ago
So your .env file has QUEUE_DRIVER=sync?
S.V Gubadov
S.V Gubadov3mo ago
i write restfull api. i want customer make order and i send notification admin panel $user return correctly yes Laravel standart notification working. this code example working correctly $user->notify(new RentOrderNotification()); but Filament Notification not working