PHPackages                             hchamran/laravel-filter - 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. [Search &amp; Filtering](/categories/search)
4. /
5. hchamran/laravel-filter

AbandonedArchivedLibrary[Search &amp; Filtering](/categories/search)

hchamran/laravel-filter
=======================

A package to help you do easily filter for search

v0.5.0(6y ago)29MITPHP

Since Sep 18Pushed 6y ago1 watchersCompare

[ Source](https://github.com/hChamran/laravel-filter)[ Packagist](https://packagist.org/packages/hchamran/laravel-filter)[ Docs](https://github.com/hChamran/laravel-filter)[ RSS](/packages/hchamran-laravel-filter/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (8)Used By (0)

Easily filter and search
========================

[](#easily-filter-and-search)

 [![](https://user-images.githubusercontent.com/43233476/65450848-eb693e80-de4a-11e9-9871-494bfb328717.png)](https://user-images.githubusercontent.com/43233476/65450848-eb693e80-de4a-11e9-9871-494bfb328717.png)

[![Scrutinizer code quality (GitHub/Bitbucket)](https://camo.githubusercontent.com/c8c06c44eca459a8df3cba49337bb4b9e7653b920d0c53eb3e1547a58fda1e9e/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f7175616c6974792f672f686368616d72616e2f6c61726176656c2d66696c7465723f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/hChamran/laravel-filter)[![Scrutinizer build (GitHub/Bitbucket)](https://camo.githubusercontent.com/9eaa83d8b31e9830029f4ec1f5e13bb3f3ee494d1e118e4ead6f6265727ed3fb/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f6275696c642f672f686368616d72616e2f6c61726176656c2d66696c7465723f636f6c6f723d677265656e267374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/hChamran/laravel-filter)[![Packagist Version](https://camo.githubusercontent.com/7a592c02606d5b50e4edaf9664aba03fbecbddb2057ab451237ca3e119ba3b8b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f686368616d72616e2f6c61726176656c2d66696c7465723f636f6c6f723d79656c6c6f77677265656e267374796c653d666c61742d737175617265)](https://packagist.org/packages/hchamran/laravel-filter)[![GitHub](https://camo.githubusercontent.com/ed4d1f9d531f7c57c3edeff4abd47709c390bd0b42176786700f8195007a2a9a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f686368616d72616e2f6c61726176656c2d66696c7465723f636f6c6f723d79656c6c6f77267374796c653d666c61742d737175617265)](https://github.com/hChamran/laravel-filter/blob/master/LICENSE)

Topics
------

[](#topics)

- [Introduction](#introduction)
- [Concept](#concept)
- [Installation](#installation)
- [Usage](#usage)

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

[](#introduction)

Always in laravel, the filter of database fields and search inside that, it's repetitive work, but you can with use this package create filters very easy.

Concept
-------

[](#concept)

This work with GET method and query string. When this receives query string, parses this query string to this characters:

SymbolDoUsageExample:separating field from valueField:valuetitle:phone-separating range of valuesvalue1-value2price:0-100,separating fields fo filter from sort methodField:value,sorttitle:phone,ascByseparating field of sorting from sort methodField:value,sortByFieldtitle:phone,ascBypriceInstallation
------------

[](#installation)

```
composer require hchamran/laravel-filter

```

(For Laravel &lt;=5.4) Next, you must add the service provider to config/app.php `config/app.php` :

```
'providers' => [
    // for laravel 5.4 and below
    HChamran\LaravelFilter\Providers\FilterServiceProvider::class,
]
```

Publish your config file

```
php artisan vendor:publish

```

Usage
-----

[](#usage)

First use filterable in your model:

```
use Filterable;
```

Second make filter class with this command for Example:

```
php artisan make:filter UserFilter

```

Third, add fields which you want to search inside it for example for products:

```
public function fields()
{
  return [
  'title', 'excerpt', 'price'
  ];
}
```

And in final just do search with helper:

```
filter(thisIsField, thisIsValue)
```

```
Low Price
```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

7

Last Release

2472d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f14fb03d5f1d3f628f2dcdf14d6d2bc9bc9c142dda34fe756ff96480e1025770?d=identicon)[hChamran](/maintainers/hChamran)

---

Top Contributors

[![Nothehi](https://avatars.githubusercontent.com/u/43233476?v=4)](https://github.com/Nothehi "Nothehi (59 commits)")

---

Tags

laravelfilter

### Embed Badge

![Health badge](/badges/hchamran-laravel-filter/health.svg)

```
[![Health](https://phpackages.com/badges/hchamran-laravel-filter/health.svg)](https://phpackages.com/packages/hchamran-laravel-filter)
```

###  Alternatives

[awesome-nova/filter-card

A Laravel Nova card.

25127.0k](/packages/awesome-nova-filter-card)[pos-lifestyle/laravel-nova-date-range-filter

A Laravel Nova date range filter.

16180.9k](/packages/pos-lifestyle-laravel-nova-date-range-filter)[tapp/filament-value-range-filter

Filament country code field.

2475.4k](/packages/tapp-filament-value-range-filter)[ambengers/query-filter

Laravel package for filtering resources with request query string

3413.8k](/packages/ambengers-query-filter)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
