F
Filamentβ€’8mo ago
Chriis

forceDeleteAction triggering deleted model event and not forceDeleted

Hi, like the title say, the Filament forceDeleteAction trigger the "wrong" model event and I have no idea why ... I looked into into the action and its using the forceDelete method so I don't know how/why its doing that in the Observer. Any idea, or someone to try on his side ?
3 Replies
Chriis
Chriisβ€’8mo ago
Up πŸ‘€
cheesegrits
cheesegritsβ€’8mo ago
Not at my computer, but iirc both delete and forceDelete events get triggered by Laravel when a model is force deleted, and in a deleting / deleted observer you have to check something like $model->isForceDeleting().
Chriis
Chriisβ€’8mo ago
Ok, thanks. I was not aware of this method πŸ™‚