Enabling & Disabling Events
About 94 wordsLess than 1 minute
eventsconfigurationfilterable
Global Configuration
Disable events globally in config/filterable.php:
'events' => [
'enabled' => false,
],Per-Instance Control
Override the global setting for specific instances:
// Disable events for this instance
$filter = PostFilter::create()->disableEvents();
// Enable events for this instance (even if globally disabled)
$filter = PostFilter::create()->enableEvents();Conditional Event Control
$filter = PostFilter::create()
->when(app()->environment('production'), fn($f) => $f->disableEvents())
->apply($builder);