New

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

refinephp/laravel-refine

A Laravel package for elegant and efficient query filtering and sorting.
5,656 2
Install
composer require refinephp/laravel-refine
Latest Version:v1.1.0
PHP:^8.0
Laravel:11 · 12 · 13
Older releases:8 · 9 · 10
License:MIT
Last Updated:Mar 19, 2026
Links: GitHub  ·  Packagist
Maintainer: ricdizio

Laravel Refine

Laravel Refine is a package that provides elegant and efficient query filtering and sorting for Laravel applications.

Installation

You can install the package via Composer:

composer require refinephp/laravel-refine
php artisan vendor:publish --tag=laravel-refine

Basic Usage

Filtering

To add filtering capabilities to your model, you can simply use the Filterable trait in your model:

use Refinephp\LaravelRefine\Traits\Filterable;

class User extends Model
{
    use Filterable;
}

Following that, you can use the filter method to filter your query results in your controller:

use App\Models\User;

class UserController extends Controller
{
    public function index()
    {
        return User::filter()->get();
    }
}

From your request, you can pass the filter parameters as query string parameters. For example:

GET /users?filters[name][$eq]=John&filters[age][$eq]=30

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

648,266,899 9,701
laravel/framework

The Laravel Framework.

604,216,237 34,982
laravel/tinker

Powerful REPL for the Laravel framework.

512,508,631 7,443
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

429,221,767 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

403,217,078 4,664

Version History

Version Released PHP Laravel License
v1.1.0 ^8.0 ^11.0|^12.0|^13.0 MIT
v1.0.0 ^8.0 ^11.0|^10.0|^9.0|^8.0|^12.0 MIT