You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use deleting for “about to delete/soft-delete” and check $model->isForceDeleting() if you need to distinguish hard deletes. Use trashed / softDeleted() for the after-soft-delete hook.
In SoftDeletes, forceDelete() fires forceDeleting first and sets the force-delete state. Normal soft deletes go through runSoftDelete() and then fire the trashed model event. The Eloquent docs list deleting, deleted, trashed, forceDeleting, forceDeleted, restoring, and restored, and model broadcasting already includes trashed.
A new trashing event would be a before-soft-delete-only hook, so it could be a reasonable feature request if you need to veto or prepare something specifically before soft delete. For most app code, deleting plus isForceDeleting() is the existing pattern.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
I've seen that Laravel has not the "trashing" event.
What people do instead to get that?
https://laravel.com/docs/13.x/broadcasting#model-broadcasting
Anyway - do you think a feature request would be interesting? or not?
All reactions