PHPackages                             xidanko/query-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. xidanko/query-filter

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

xidanko/query-filter
====================

Elegant full featured query filter for laravel.

v1.0.3(2y ago)1183↓100%MITPHPPHP &gt;=7.4

Since Feb 8Pushed 2y ago1 watchersCompare

[ Source](https://github.com/XiDanko/query-filter)[ Packagist](https://packagist.org/packages/xidanko/query-filter)[ RSS](/packages/xidanko-query-filter/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)DependenciesVersions (5)Used By (0)

Laravel Query Filter
====================

[](#laravel-query-filter)

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

[](#installation)

---

```
composer require xidanko/query-filter
```

Laravel will discover package service provider automatically

Basic Usage
-----------

[](#basic-usage)

---

First you have to add `XiDanko\QueryFilter\HasFilter` trait to the desired model.

This will register `useFilter` local scope to your model.

Now create new filter using this artisan command

```
php artisan make:filter
```

This will create a new filter class in `App\Filters` directory, there you can define all your filter methods.

Example
-------

[](#example)

---

After using the trait in your desired model and creating the filter class you can hype hint your class in any controller method:

```
public function index(Filter $yourFilterClass)
{
    return User::useFilter($yourFilterClass)->get();
}
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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 ~248 days

Total

4

Last Release

809d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/042fa127461fd40068ad018c64ce7508c01b110458ccd6faa6f63c514d64456e?d=identicon)[XiDanko](/maintainers/XiDanko)

---

Top Contributors

[![XiDanko](https://avatars.githubusercontent.com/u/32465994?v=4)](https://github.com/XiDanko "XiDanko (5 commits)")

---

Tags

laravelqueryfilterlaravel filterfilter querylaravel filter query

### Embed Badge

![Health badge](/badges/xidanko-query-filter/health.svg)

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

###  Alternatives

[mehdi-fathi/eloquent-filter

Eloquent Filter adds custom filters automatically to your Eloquent Models in Laravel.It's easy to use and fully dynamic, just with sending the Query Strings to it.

450191.6k1](/packages/mehdi-fathi-eloquent-filter)[ambengers/query-filter

Laravel package for filtering resources with request query string

3513.5k](/packages/ambengers-query-filter)[hashemi/queryfilter

A simple &amp; dynamic package for your eloquent query in laravel. It will help you to write query logic individual for each parameter.

391.1k](/packages/hashemi-queryfilter)[pos-lifestyle/laravel-nova-date-range-filter

A Laravel Nova date range filter.

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

Filament country code field.

2362.2k](/packages/tapp-filament-value-range-filter)[webbingbrasil/filament-datefilter

Date filter component for filament tables.

1479.4k](/packages/webbingbrasil-filament-datefilter)

PHPackages © 2026

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