Database Notification Actions are Not Saved on Database
Actions are not showing
12 Replies
Are they in the database? Are they showing in filament
Yes the notifications are showing
Except for the actions that I'm trying to add
And when you check the datbase are they there?
I would suspect you are not sending to the correct user
Ohh, the actions are not being saved to database
So ther eis your problem
ya not sure why it doesn't save the actions to database
is $job->account->user a correct user model? not a user_id ?
$job->account->user is a user model
You need to debug it
This problem is very frustrating.
The solution is simple: use
sendToDatabase
after actions
are initialized.
When you use sendToDatabase
immediately after actions, it sends the notification to the database right away. This bypasses the actions
because they haven't been initialized yet.
This needs to be documented.Please feel free to make a documentation PR π