> For the complete documentation index, see [llms.txt](https://docs.tomatophp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tomatophp.com/tomato-admin/table/filters.md).

# Filters

<figure><img src="/files/MDrKXvJr2zSDzeyhWyCt" alt=""><figcaption></figcaption></figure>

there is a limitation on a filtering table inside [Splade table](https://splade.dev/docs/table-query-builder) so we added more features to the filters inside Splade Table

## Boolean Filter

I think we all need a filter with a boolean inside our tables to get active users or any boolean value filter, so we added a new filter method to Splade Table&#x20;

you can use it like this

```php
->boolFilter(
    key: 'is_active',
    label: __('Activated')
);
```

## Date Filter

as we go we need to filter a table by date range from to, so we add auto data filter to filter your records by created\_at filed form, to. just in one line

```php
->dataFilter();
```

you can custom it by using another like updated\_at

```php
->dateFilter(
    key: 'updated_at', 
    label: __('Updated At')
);
```

## Select Filter With Remote Data

is the feature we all need to get data from the remote URL inside the table filter, we make this happen we adding a new method to the table with more features.

you can use this selected like this

```php
->selectFilter(
    key: 'account_id',
    label: __('Account'),
    remote_root: 'data',
    remote_url: route('admin.accounts.index'),
    option_label: 'name',
    option_value: 'id',
);
```

## Override Filter Auto Query

as we know when we change the table filter it does the magic of filtering without any logic for this filter, but sometimes we need to do some extra custom query when the filter changes, so we add a new attribute inside all types of filters to do this.

you can use it like this.

```php
->selectFilter(
    key: 'account_id',
    label: __('Account'),
    remote_root: 'data',
    remote_url: route('admin.accounts.index'),
    option_label: 'name',
    option_value: 'id',
    applyQuery: false
);

```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.tomatophp.com/tomato-admin/table/filters.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
