> ## Documentation Index
> Fetch the complete documentation index at: https://nova.laravel.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Registering Filters

> Learn how to register filters with your resources.

Once you have defined a filter, you are ready to attach it to a resource. Each resource generated by Nova contains a `filters` method. To attach a filter to a resource, you should simply add it to the array of filters returned by this method:

<CodeGroup>
  ```php Construct theme={null}
  use Laravel\Nova\Http\Requests\NovaRequest;

  // ...

  /**
   * Get the filters available for the resource.
   *
   * @return array<int, \Laravel\Nova\Filters\Filter>
   */
  public function filters(NovaRequest $request): array
  {
      return [
          new Filters\UserType,
      ];
  }
  ```

  ```php Make theme={null}
  use Laravel\Nova\Http\Requests\NovaRequest;

  // ...

  /**
   * Get the filters available for the resource.
   *
   * @return array<int, \Laravel\Nova\Filters\Filter>
   */
  public function filters(NovaRequest $request): array
  {
      return [
          Filters\UserType::make(),
      ];
  }
  ```
</CodeGroup>

## Searchable Select Filters

Select filters may be optionally searchable. To allow your select filter to be searchable, invoke the `searchable` method when registering your filter:

```php app/Nova/~Resource.php {14} theme={null}
use Laravel\Nova\Http\Requests\NovaRequest;

// ...

/**
 * Get the filters available for the resource.
 *
 * @return array<int, \Laravel\Nova\Filters\Filter>
 */
public function filters(NovaRequest $request): array
{
    return [
        Filters\UserType::make()
            ->searchable(),
    ];
}
```
