withoutGlobalScope in Table filter

I have a model that has a
status
column and a globalScope in the Eloquent model
static::addGlobalScope('active', function (Builder $builder) {
  $builder->where('status', 1);
});


My intention was to make a filter that would disable that globalScope for the table, it should keep the global scope for the global search.

I tried adding it to the query Builder but that does not have any effect
Filter::make('include_inactive')
  ->query(fn (Builder $query): Builder => $query->withoutGlobalScope('active')),


and removing the globalScope in
getEloquentQuery
ruins the global search.
Was this page helpful?