F
Filamentβ€’12mo 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β€’12mo ago
Up πŸ‘€
cheesegrits
cheesegritsβ€’12mo 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β€’12mo ago
Ok, thanks. I was not aware of this method πŸ™‚
Want results from more Discord servers?
Add your server