PHPackages                             sedehi/filterable - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. sedehi/filterable

ActiveLibrary[Database &amp; ORM](/categories/database)

sedehi/filterable
=================

v3(2y ago)513.9k1[4 PRs](https://github.com/sedehi/filterable/pulls)MITPHPCI failing

Since Sep 30Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/sedehi/filterable)[ Packagist](https://packagist.org/packages/sedehi/filterable)[ RSS](/packages/sedehi-filterable/feed)WikiDiscussions v3 Synced 2mo ago

READMEChangelog (10)Dependencies (11)Versions (28)Used By (0)

Laravel Filterable
==================

[](#laravel-filterable)

[![Latest Stable Version](https://camo.githubusercontent.com/7580f4d33a37e141e956c9757f1bb2a494dab0e3fc608b6e2e0bcb3a562b5aa4/68747470733a2f2f706f7365722e707567782e6f72672f7365646568692f66696c74657261626c652f762f737461626c65)](https://packagist.org/packages/sedehi/filterable)[![Packagist Downloads (custom server)](https://camo.githubusercontent.com/68236510c7df05bf10d73ae4ef9b207ad6a8e0ce411bd3bbcf68f43f6b6398b3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f7365646568692f66696c74657261626c65)](https://camo.githubusercontent.com/68236510c7df05bf10d73ae4ef9b207ad6a8e0ce411bd3bbcf68f43f6b6398b3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f7365646568692f66696c74657261626c65)[![GitHub Workflow Status](https://camo.githubusercontent.com/8c2a176ed38e286306a4e8a9a4a2d024a1dca0b2572ce326fbc370ebefa0e79b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7365646568692f66696c74657261626c652f72756e2d74657374732e796d6c3f6272616e63683d7633266c6162656c3d5465737473)](https://github.com/sedehi/filterable/actions/workflows/run-tests.yml)

Introduction
------------

[](#introduction)

The `Sedehi/Filterable` package is designed for performing searches on models based on query strings found in requests. It allows you to easily filter model data according to the query parameters provided in HTTP requests.

Installation
------------

[](#installation)

To get the latest version, simply require the project using [Composer](https://getcomposer.org):

```
composer require sedehi/filterable
```

If you are using **Laravel &gt;=5.5** the service provider will be automatically discovered otherwise we need to add the filterable service provider to `config/app.php` under the providers key:

```
Sedehi\Filterable\FilterableServiceProvider::class,
```

Usage
-----

[](#usage)

The first step in using the Sedehi/Filterable package in your Laravel application is to add the `Sedehi\Filterable\Filterable` trait to any model on which you want to perform filtering.

Below is an example of a model with the Filterable trait:

```
