I can't seem to find a solution for this. I have a Laravel Notification
that uses the Queueable
trait. So, the scenario is like this: a user posts a new record, a notification is normally queued to be sent to all other users available. But then, that user, wishes to cancel/delete the newly added record.
Deleting the already sent out notifications is easy, but how do I delete the notifications that are still in queue?
Will InteractsWithQueue
help with this concern? If so, I'm not sure how to utilize it though. Do I create a different Job
to do the cleanup?
Thanks.
UPDATE:
BTW, I am using the database
queue and SoftDeletes
trait for this. And said notification is dispatched right after the record is created.