By default a notification is attached to a specific user.
What could be the solution if I need that a notification is available for several users (for example the managers can see the notifications) and once a manager has handled the notification, it is destroyed from the database, so that other managers don't see it anymore.
Is it a solution by using the standard Laravel notifications ?
As I can think 🤔..
Keep the notification table as a master and bring out the notifications and show to all managers and look if any of the notification is handled by any other manger, then immediately destroy it as you need and no one can see it.
Hmmm ... but this way I need to assign the notification to a user ... the superadmin for example.
Oh yes ... effectively I could do that ... assign all notifications to the superadmin (or why not to a specific user like notificationuser) and then retrieve the notifications like you suggest me.
What could be ideal is to generate notifications without assigning them a user.
Is it possible to store an on-demand notification without specifying any user ?
If I am not wrong, the OP has written... Once the notification is handled then it will be removed from the database. So for now there is no need for the group I'd.
It looks interesting ... But that means that I need to create several times the same notification (each time sent to another manager).
What could also be interesting is that I have several notifications and if I create a new manager after these notifications has been sent, he also sees the notifications so that he can help to respond them.
Yes that's another way of looking at things. Interesting too ;). And it's probably the solution I need ...
And now I wonder how to handle an eventual conflict if 2 managers respond to the same task at the same time. Hmmm perhaps when a manager opens a task he can tag it to specify that he will process it and then this task won't appear on the other managers' dashboards. And if he doesn't want to process it, he can also reject it and then it appears once again on all managers' dashboards.