PHPackages                             atnic/eloquent-filters - 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. atnic/eloquent-filters

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

atnic/eloquent-filters
======================

Laravel 5 Filterable Eloquents.

2.2.2(4y ago)01.0k3MITPHPPHP ^7.3|^8.0

Since Jan 10Pushed 4y ago2 watchersCompare

[ Source](https://github.com/Atnic/eloquent-filters)[ Packagist](https://packagist.org/packages/atnic/eloquent-filters)[ Docs](https://github.com/atnic/eloquent-filters)[ RSS](/packages/atnic-eloquent-filters/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (1)Versions (4)Used By (3)

Filterable Eloquent
===================

[](#filterable-eloquent)

Easily filter Laravel Eloquent queries by using URL query strings.

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

[](#installation)

Install the package via composer

```
composer require atnic/eloquent-filters

```

Usage
-----

[](#usage)

First you need to add Filterable trait and filters attribute to your model as the following:

```
use Smartisan\Filters\Traits\Filterable;

class User extends Model
{
    use Filterable;

    protected $filters = App\Filters\UserFilter::class;
}
```

Then create UserFilter class and define your filters as public methods:

```
use Smartisan\Filters\Filter;

class UserFilter extends Filter
{
    public function status($code)
    {
        return $this->builder->where('status', $code);
    }
}
```

Note that you are able to access the query builder instance of user by using `$this->builder`.

Now in order to check for URL query strings and perform the corrosponding filter, you need to use `User::filter($request)->get()`.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Mohammed Isa](https://github.com/mohd-isa)
- [All Contributors](https://github.com/mohd-isa/laravel-settings/graphs/contributors)

License
-------

[](#license)

The [MIT License (MIT)](https://github.com/mohd-isa/laravel-settings/blob/master/LICENSE.md). Please see License File for more information.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity68

Established project with proven stability

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

Total

2

Last Release

1671d ago

PHP version history (2 changes)2.2.1PHP ^7.0

2.2.2PHP ^7.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/4856bbafb70a46f14e078d91593d9117e564b4e025dce785efd0779915639972?d=identicon)[frdteknikelektro](/maintainers/frdteknikelektro)

---

Top Contributors

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

---

Tags

laraveleloquent-filters

### Embed Badge

![Health badge](/badges/atnic-eloquent-filters/health.svg)

```
[![Health](https://phpackages.com/badges/atnic-eloquent-filters/health.svg)](https://phpackages.com/packages/atnic-eloquent-filters)
```

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11223.5M33](/packages/anourvalar-eloquent-serialize)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135224.7k7](/packages/statamic-rad-pack-runway)[api-platform/laravel

API Platform support for Laravel

58171.6k14](/packages/api-platform-laravel)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21318.6k3](/packages/ecotone-laravel)[ramadan/easy-model

A Laravel package for enjoyably managing database queries.

111.6k](/packages/ramadan-easy-model)

PHPackages © 2026

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