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

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity57

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

2071d 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

[swisnl/laravel-fulltext

Fulltext indexing and searching for Laravel

184104.5k6](/packages/swisnl-laravel-fulltext)[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[baijunyao/laravel-scout-elasticsearch

Elasticsearch Driver for Laravel Scout

8023.7k1](/packages/baijunyao-laravel-scout-elasticsearch)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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