Is there a way to remove a model observer that is added with
$model->observe(new ObserverObject)
Maybe something like
$model->observers['ObserverObject']->remove()
Thanks
You can check your event name by doing:
dd( $model->getEventDispatcher()->getListeners() );
And remove it using:
$model->getEventDispatcher()->forget($event);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With