Deleted user notification problem

Posted 1 month ago by ruskidragonball

Hello all,

I have a UserObserver class and I want to send an email notification to the user when he will be deleted from the database. So in the deleted() method I have

Notification::route('mail', $user->email)->notify(new UserDeleted($user));

Notification is queable but it doesn't work. Because propably when it is executed no model exists. How is it possible to manage this situation?

Please sign in or create an account to participate in this conversation.