PHPackages                             pianzhou/laravel-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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. pianzhou/laravel-query-filter

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

pianzhou/laravel-query-filter
=============================

This is laravel extension packages

v1.0.1(3y ago)215MITPHPPHP &gt;=7.2

Since Jun 15Pushed 3y ago1 watchersCompare

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

READMEChangelog (2)DependenciesVersions (3)Used By (0)

pianzhou/laravel-query-filter
=============================

[](#pianzhoularavel-query-filter)

Install
-------

[](#install)

You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/):

```
composer require pianzhou/laravel-query-filter

```

Database Query Filter
=====================

[](#database-query-filter)

Config app.php

```
Pianzhou\Laravel\Query\Filter\ServiceProvider::class,

```

Demo：

```
// demo one
DemoModel::filter($request->get('name'), function(int $value) {
        $this->where('name', 'like', $value);
    }, \Pianzhou\Laravel\Query\Filter\Filter::MODE_NULL);

// demo two
DemoModel::filters($request->only('column1', 'column2', 'column3'))->get();

// demo three
DemoModel::filters($request->only('name'), function (\Pianzhou\Laravel\Query\Filter\Filter $filter) {
    $filter->where('name', 'like')
        ->where('nickname', 'like');
})->get();

// demo four
DemoModel::filters($request->only('name'), function (\Pianzhou\Laravel\Query\Filter\Filter $filter) {
    $filter->when('name', function (int $value) {
            $this->where('name', 'like', $value);
        })
    ->when('nickname', function (string $value) {
        $this->where('nickname', 'like', $value);
    }, \Pianzhou\Laravel\Query\Filter\Filter::MODE_NULL);
})->get();

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

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

Total

2

Last Release

1391d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

psr-3laravelqueryfilter

### Embed Badge

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

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

###  Alternatives

[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)[kitloong/laravel-app-logger

Laravel log for your application

101.2M8](/packages/kitloong-laravel-app-logger)[ambengers/query-filter

Laravel package for filtering resources with request query string

3513.5k](/packages/ambengers-query-filter)[devthis/console-logg

Effortless artisan console output with your usual Laravel logger

1112.7k](/packages/devthis-console-logg)

PHPackages © 2026

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