F
Filament12mo ago
Simon

Muting Events

Does anyone know of a way with PanelBuilder to prevent model events being fired when a form is submitted? I have an event listener that gets queued on every save, but I don't want it to run when my admin panel is being used.
Solution:
Figured it out! In my EditDeveloper Page: ``` protected function beforeSave(): void {...
Jump to solution
1 Reply
Solution
Simon
Simon12mo ago
Figured it out! In my EditDeveloper Page:
protected function beforeSave(): void
{
Developer::unsetEventDispatcher();
}
protected function beforeSave(): void
{
Developer::unsetEventDispatcher();
}
Want results from more Discord servers?
Add your server