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

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

koenhoeijmakers/laravel-filterable
==================================

Explicit request filtering.

v6.0.0(3y ago)380.5k↓50%11MITPHPPHP &gt;=8.1CI failing

Since Feb 15Pushed 3y ago1 watchersCompare

[ Source](https://github.com/koenhoeijmakers/laravel-filterable)[ Packagist](https://packagist.org/packages/koenhoeijmakers/laravel-filterable)[ RSS](/packages/koenhoeijmakers-laravel-filterable/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (25)Used By (1)

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

[](#laravel-filterable)

[![Build](https://github.com/koenhoeijmakers/laravel-filterable/actions/workflows/build.yml/badge.svg)](https://github.com/koenhoeijmakers/laravel-filterable/actions/workflows/build.yml)[![Packagist](https://camo.githubusercontent.com/570b40bff08f6ab56bd471174e273e29eea864a17d6c5120706291e145fe1db7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b6f656e686f65696a6d616b6572732f6c61726176656c2d66696c74657261626c652e7376673f636f6c6f72423d627269676874677265656e)](https://packagist.org/packages/koenhoeijmakers/laravel-filterable)[![Packagist](https://camo.githubusercontent.com/787bce4d60302d6585be8d718af9d8a6312ddd913eac8fd9f6bfecfd86c21ec0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b6f656e686f65696a6d616b6572732f6c61726176656c2d66696c74657261626c652e7376673f636f6c6f72423d627269676874677265656e)](https://packagist.org/packages/koenhoeijmakers/laravel-filterable)[![license](https://camo.githubusercontent.com/764f1ccc55ce11794699fed6cc17cc025d3715c37617dbcc278d6b4f4acd444b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6b6f656e686f65696a6d616b6572732f6c61726176656c2d66696c74657261626c652e7376673f636f6c6f72423d627269676874677265656e)](https://github.com/koenhoeijmakers/laravel-filterable)

A Laravel package to implement filtering by request parameters.

```
example.com/json?name=Koen&sortBy=name&desc=0
```

Usage
-----

[](#usage)

Require the package.

```
composer require koenhoeijmakers/laravel-filterable
```

Inject it in your controller (or resolve it from the container in any other way).

```
namespace App\Http\Controllers\Api\User;

use KoenHoeijmakers\LaravelFilterable\Contracts\Filtering;

final class Index
{
    public function __construct(
        private readonly Filtering $filtering
    ) {}

    public function __invoke()
    {
        $builder = User::query();

        $this->filtering->builder($builder)
            ->filterFor('name', fn(Builder $builder, string $value) => $builder
                ->where('name', 'like', "{$value}%");
            )
            ->sortFor('name')
            ->defaultSorting('name')
            ->filter();

        return UserResource::collection($builder->paginate());
    }
}
```

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 97.3% 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 ~79 days

Recently: every ~225 days

Total

24

Last Release

1168d ago

Major Versions

v1.0.4 → v2.0.02018-06-02

v2.0.2 → v3.0.02018-07-10

v3.1.2 → v4.0.02019-04-08

v4.5.1 → v5.02022-11-29

v5.0.1 → v6.0.02023-02-27

PHP version history (3 changes)v2.0.0PHP &gt;=7.0

v4.0.0PHP &gt;=7.2

v5.0PHP &gt;=8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2232776?v=4)[Koen Hoeijmakers](/maintainers/koenhoeijmakers)[@koenhoeijmakers](https://github.com/koenhoeijmakers)

---

Top Contributors

[![koenhoeijmakers](https://avatars.githubusercontent.com/u/2232776?v=4)](https://github.com/koenhoeijmakers "koenhoeijmakers (109 commits)")[![Dylan-DPC](https://avatars.githubusercontent.com/u/99973273?v=4)](https://github.com/Dylan-DPC "Dylan-DPC (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/koenhoeijmakers-laravel-filterable/health.svg)

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

###  Alternatives

[spatie/laravel-searchable

Pragmatically search through models and other sources

1.4k1.5M23](/packages/spatie-laravel-searchable)[fusic/seaaaaarch

search

1366.0k](/packages/fusic-seaaaaarch)[omure/scout-advanced-meilisearch

Laravel Scout extension that allows to use meilisearch advanced features as well as has an extended collection driver for testing purposes.

123.9k](/packages/omure-scout-advanced-meilisearch)

PHPackages © 2026

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