New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

indexzer0/eloquent-filtering

Powerful eloquent filtering
48,103 222

Larablocks Analysis

indexzer0/eloquent-filtering works with Laravel 10 to 13 (latest release 2.2.2, Apr 2, 2026).

Recommendation checks

Solid choice

Solid choice: maintained and up to date, meets 3 of 4 checks; below the bar for Recommended on use.

  • Works with Laravel 13, the current version
  • Released in the last 12 months (Apr 2, 2026)
  • 5,245 downloads a month (needs 10,000)
  • 222 GitHub stars (at least 100)

State

Maintained
  • Last stable release: Apr 2, 2026.
  • 2 releases in the last 12 months.
  • First released: Jun 15, 2024.
  • Monthly downloads: 5,245, up 138% from six months ago.
  • 2 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Dec 1, 2026.

Install
composer require indexzer0/eloquent-filtering
Latest Version:2.2.2
PHP:^8.2
Laravel:10 – 13
License:MIT
Last Updated:Dec 1, 2026
Links: GitHub  ·  Packagist
Maintainer: IndexZer0

Eloquent Filtering

Filter example

Latest Version on Packagist Total Downloads GitHub Tests Action Status Codecov


Easily filter eloquent models using arrays

Eloquent Filtering simplifies implementing search functionality for your Eloquent models, whether simple or complex, by eliminating the need for custom query logic. It allows you to easily define and manage filters directly within your models, and seamlessly apply them using incoming HTTP request data to dynamically filter your models.

With this package, you can build more readable, maintainable, and scalable code, boosting your productivity and speeding up development.

Whether you’re building APIs, dashboards, or advanced search systems, Eloquent Filtering provides a powerful and flexible way to streamline your Eloquent queries, making it easier to manage and extend your application’s filtering capabilities.


View The Docs


Quick Look

class Product extends Model implements IsFilterable
{
    use Filterable;

    public function allowedFilters(): AllowedFilterList
    {
        return Filter::only(
            Filter::field('name', [FilterType::EQUAL]),
        );
    }
}

$products = Product::filter([
    [
        'target' => 'name',
        'type'   => '$eq',
        'value'  => 'TV'
    ]
])->get();

Requirements

  • PHP Version >= 8.2
  • Laravel Version >= 10

Installation

You can install the package via composer:

composer require indexzer0/eloquent-filtering

Run the install artisan command to publish the config:

php artisan eloquent-filtering:install

Testing

composer test

Docs

npm i -g mintlify
cd docs
mintlify dev

Changelog

Please see CHANGELOG for more information on what has changed recently.


Feature Ideas

Please see Feature ideas for potential future features.


Credits


License

The MIT License (MIT). Please see License File for more information.

Alternatives to indexzer0/eloquent-filtering

kyslik/column-sortable

Package for handling column sorting in Laravel 11-13

6,787,773 643
rutorika/sortable

Adds sortable behavior and ordering to Laravel Eloquent models. Grouping and man...

1,164,553 288
akaunting/laravel-sortable

Sortable behavior package for Laravel

240,886 27
aw-studio/laravel-model-index

Filterable, sortable, searchable index listing for laravel models

10,937 0
lacodix/laravel-model-filter

A Laravel package to filter, search and sort models with ease while fetching fro...

77,829 176

Version History

Version Released PHP Laravel License
2.2.2 ^8.2 ^10.0||^11.0||^12.0||^13.0 MIT
2.2.1 ^8.2 ^10.0||^11.0||^12.0 MIT
2.2.0 ^8.2 ^10.0||^11.0||^12.0 MIT
2.1.1 ^8.2 ^10.0||^11.0 MIT
2.1.0 ^8.2 ^10.0||^11.0 MIT