F
Filamentβ€’14mo 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
ChriisOPβ€’14mo ago
Up πŸ‘€
cheesegrits
cheesegritsβ€’14mo 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
ChriisOPβ€’14mo ago
Ok, thanks. I was not aware of this method πŸ™‚

Did you find this page helpful?