PHPackages                             j-dexx/eloquent-ransack - 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. j-dexx/eloquent-ransack

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

j-dexx/eloquent-ransack
=======================

Easily filter eloquent models

v1.0.2(5y ago)61.1k5MITPHP

Since Jun 7Pushed 5y ago1 watchersCompare

[ Source](https://github.com/j-dexx/eloquent-ransack)[ Packagist](https://packagist.org/packages/j-dexx/eloquent-ransack)[ RSS](/packages/j-dexx-eloquent-ransack/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (5)Versions (4)Used By (0)

Inspired by [the ransack gem](https://github.com/activerecord-hackery/ransack) eloquent ransack's goal is to provide a simplistic filtering method on eloquent models.

Usage
-----

[](#usage)

The Ransackable trait provides a ransack scope that you pass an array of input to. All filters should be of the form `column_name_predicate` where predicate is one of the options listed in the table below.

Available Filtering Types
-------------------------

[](#available-filtering-types)

predicateexamplesqleqname\_eqwhere "name" = ?not\_eqname\_not\_eqwhere "name" != ?contname\_contwhere "name" LIKE ?incategory\_id\_inwhere "category\_id" in (?)not\_incategory\_id\_not\_inwhere "category\_id" not in (?)ltdate\_ltwhere "date" &lt; ?ltedate\_ltewhere "date" &lt;= ?gtdate\_gtwhere "date" &gt; ?gtedate\_gtewhere "date" &gt;= ?Example
-------

[](#example)

Eloquent Model

```
use Jdexx\EloquentRansack\Ransackable;

class Post
{
  use Ransackable;
}
```

Form

```

```

Controller

```
class PostsController
{
  public function index(Request $request)
  {
    $params = $request->all();
    $posts = Post::ransack($params)->get();
  }
}
```

###  Health Score

31

—

LowBetter than 65% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

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

Total

3

Last Release

2167d ago

### Community

Maintainers

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

---

Top Contributors

[![j-dexx](https://avatars.githubusercontent.com/u/6691543?v=4)](https://github.com/j-dexx "j-dexx (4 commits)")

### Embed Badge

![Health badge](/badges/j-dexx-eloquent-ransack/health.svg)

```
[![Health](https://phpackages.com/badges/j-dexx-eloquent-ransack/health.svg)](https://phpackages.com/packages/j-dexx-eloquent-ransack)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.4M354](/packages/psalm-plugin-laravel)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8723.3M27](/packages/yajra-laravel-oci8)[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k161.4k2](/packages/mike-bronner-laravel-model-caching)[api-platform/laravel

API Platform support for Laravel

58190.1k21](/packages/api-platform-laravel)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45844.8k1](/packages/pressbooks-pressbooks)[forjedio/inertia-table

Backend-driven dynamic tables for Laravel + Inertia.js

272.0k](/packages/forjedio-inertia-table)

PHPackages © 2026

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