Skip to content

Commit

Permalink
Update filters.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tabuna authored Jul 29, 2023
1 parent fd297e3 commit 008bfb3
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions docs/en/docs/filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@ title: Eloquent Filters
description: Learn how to use the Eloquent Filters feature in Laravel Orchid to easily filter and search your database records. Improve the user experience of your administration-style app with powerful and customizable filters.
---

Filters used to simplify the search for records using a typical filter.
For example, if you want to filter the product catalog by attributes, brands, etc.
The sample values based on the Http request parameters.

> **Note.** This is not a ready-made solution or a universal remedy.
You must expand the structure for your specific applications.


## Eloquent Filter

Expand All @@ -36,13 +29,16 @@ use Illuminate\Database\Eloquent\Builder;

class EmailFilter extends Filter
{

/**
* The array of matched parameters.
*
* @var array
*/
public $parameters = ['email'];

/**
* Apply filter if the request parameters were satisfied.
*
* @param Builder $builder
*
* @return Builder
Expand All @@ -53,6 +49,8 @@ class EmailFilter extends Filter
}

/**
* Get the display fields.
*
* @return Field[]
*/
public function display(): array
Expand Down

0 comments on commit 008bfb3

Please sign in to comment.