forceDelete method fires both deleted and forceDeleted event #36191
Unanswered
johnylemon
asked this question in
Q&A
Replies: 2 comments 2 replies
-
Can you show me/us your code |
Beta Was this translation helpful? Give feedback.
2 replies
-
The event you are searching for is |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am curious what is the reason behind decision of firing
deleted
event during bothdelete
andforceDelete
action.Where is my problem:
When user deletes his account,
deleted_at
is filled with current date, (softDeletes
trait handles that for me).Next the
deleted
event fromUserObserver
class is fired, where I am firing next event with queued listener, doing some cleanup logic. This may take some time.Then, from this listener I would like to remove user record entirely using
forceDelete
method.But both
deleted
andforceDeleted
events are fired. So my cleanup process will be fired again.I think this behavior may be corrected
Beta Was this translation helpful? Give feedback.
All reactions