PHPackages                             humam-k98/laravel-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. humam-k98/laravel-filters

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

humam-k98/laravel-filters
=========================

Laravel 8+ filtering toolkit using builder pattern

v1.1.0(1y ago)018MITPHPPHP ^7.4|^8.0

Since May 3Pushed 1y ago1 watchersCompare

[ Source](https://github.com/humam-k98/laravel-filters)[ Packagist](https://packagist.org/packages/humam-k98/laravel-filters)[ Docs](https://github.com/humam-k98/laravel-filters)[ RSS](/packages/humam-k98-laravel-filters/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (6)Used By (0)

Laravel Filters
===============

[](#laravel-filters)

A powerful Laravel 8+ filtering package that provides a clean and flexible way to filter Eloquent models using the builder pattern. Now with support for Laravel 8, 9, 10, and 11! It enables developers to create robust API filtering systems with minimal code, supporting both manual filter creation and dynamic generation of filter classes based on model properties.

Features
--------

[](#features)

- **Zero Configuration** - Works out of the box with your Eloquent models
- **Flexible Filtering** - Filter by exact matches, ranges, partial matches, and more
- **Sorting Support** - Easy sorting with sort\_by and sort\_direction parameters
- **Framework Compatibility** - Works with Laravel 8, 9, 10, and 11
- **Custom Filters** - Create custom filter classes for complex filtering logic
- **Dynamic Filters** - Generate filters on-the-fly based on model properties
- **Parameter Aliasing** - Map request parameters to filter methods
- **Pagination Support** - Seamlessly works with Laravel's pagination

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

[](#installation)

You can install the package via composer:

```
composer require humam-k98/laravel-filters
```

The package will automatically register its service provider.

Basic Usage
-----------

[](#basic-usage)

### 1. Add the Filterable trait to your model

[](#1-add-the-filterable-trait-to-your-model)

```
