Level 122
perhaps a property on the model which you set before updating, then in the observer if this flag is set, it bypasses the function
$model->withoutFoo=true
observer
if($this->withoutFoo) return;
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have two observers that trigger on updating a model, however for one specific case, in one file, in one method - I need only one of the observers to fire when updating a model.
Is there a way to do this?
perhaps a property on the model which you set before updating, then in the observer if this flag is set, it bypasses the function
$model->withoutFoo=true
observer
if($this->withoutFoo) return;
Please or to participate in this conversation.