Is there a reason why a DeleteAction wouldn't trigger a model observer event?
Using a DeleteAction in my class and it doesn't seem to be triggering the delete event on the model observer.
Could it be because
$this->item
is just a generic Model
class and not the specific model type I'm deleting (I'm using this class for a couple different types of models)?
It's deleting it in the database correctly, it's just not firing the event in the observer as far as I can tell.
3 Replies
That doesn't appear to be the problem. I modified my DeleteAction like below and still no model events are fired.
@Jon Mason do you find a solution for trigger model obserservers? thanks!
You shouldn’t have to trigger a model observer. Laravel triggers those.