Applying Filters using $table->headerActions()

Hi, I have a quick question:

If I have a table with a filter like:
$table
  (...)
  ->filters([
        Tables\Filters\Filter::make('today')
        ->query(fn (Builder $query) => $query->whereDate('inbound_appointment', Carbon::today())),
        ])


Is it possible to apply this filter from an outside action, like a headerAction in the same table, for example:

$table
  ->filters(...same as above...)
  ->headerActions([ 
    Action::make('today')
      ->action(fn($table) => $table->getFilter('today') !!! some method here like "->apply()" !!!)
    ])


Basically, I want to be able to manipulate the table filters using methods on the table.
Any ideas?
Was this page helpful?