PHPackages                             dwikipeddos/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. dwikipeddos/filterable

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

dwikipeddos/filterable
======================

a package for filtering laravels model using query request

1.0.0(4y ago)022MITPHP

Since Jan 19Pushed 4y ago1 watchersCompare

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

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

Filterable
==========

[](#filterable)

A package for laravel that are designed to help you filter your model using request queries.

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

[](#installation)

Use [composer](https://getcomposer.org/) dependency manager to install `filterable`

`composer require dwikipeddos/filterable`

Usage Example
-------------

[](#usage-example)

First in your model you need to use `dwikipeddos/filterable` trait, this will add a scope for filtering to your model

```
class User extends Authenticatable
{
    use HasApiTokens, HasFactory, Notifiable,Filterable;
}

```

Next you need to create a class for filtering for each of your filterable model and extends `FilterBase`, you can place this class anywhere you want. for example, we place it in `app/filters`

```
class UserFilter extends FilterBase{

    //pay attention to the function name, because the function name = the request query
    public function name(string $name) : Builder {
        //then all you need to do is filter the builder inside this function;
        return $this->builder->name("name","LIKE","%$name%");
    }
}

```

Finally to filter out your query all you need to do is call filter in your model!

```
public function index(UserFilter $filter){
    return User::filter($filter)->get();
}

```

that's it, now the package will filter out all the query you need.

License
-------

[](#license)

[MIT](https://choosealicense.com/licenses/mit/)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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

Unknown

Total

1

Last Release

1579d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/892cde0f60e8b11b4572566ba25a859a9c0961cf3a8df3dfdd77475a81294847?d=identicon)[dwikipeddos](/maintainers/dwikipeddos)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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