Database notifications not showing in panel
I added database notifications to one of my panels and I see the icon and I get the slide over. I also configured a toDatabase method on the Laravel notification I had created. I see it getting stored in the DB and it is linked to the correct model but nothing is showing in the user interface. Any ideas?
9 Replies
maybe some screenshot or screen recording or some code so we can understand more đ
Try changing
QUEUE_CONNECTION
in your .env from âdatabaseâ to 'syncâI already had my QUEUE_CONNECTION set to sync
I've added
->databaseNotifications()
on my panel and I see the icon as expected. My Laravel notification has database specified as one of the channels and I've also added a toDatabase
method:
Here is what I see in the DB after the notification is sent. I am logged in as the correct customer as well.
Does Filament only show notifications that are directly associated to the user that is logged in? I was thinking that it would work for my Customer model which acts like a team
Does Filament only show notifications that are directly associated to the user that is logged in?I guess that's the default behaviour.
I'm thinking this could be a good PR for me to work on. I haven't tried to contribute before so I'm just curious if I could get some input on whether y'all think this would be a helpful addition for the framework before I work on it. I'm thinking users would get access to something like
->setNotifiableModel()
or ->getNotifiableUsing()
.Not sure whether that would help in that case. Wouldnât you still want notifications per user not only per team?
I had been thinking that it would be good to avoid sending a notification to each member of the team but I suppose that I would still need to have notifications on the user level in case they are creating exports or something similar