PHPackages                             netsells/eloquent-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. netsells/eloquent-filters

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

netsells/eloquent-filters
=========================

A simple package to help you easily organise model query logic

2.0.0(5y ago)11.1k1MITPHPPHP ^8.0

Since Nov 18Pushed 3y ago2 watchersCompare

[ Source](https://github.com/netsells/eloquent-filters)[ Packagist](https://packagist.org/packages/netsells/eloquent-filters)[ RSS](/packages/netsells-eloquent-filters/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (2)Dependencies (2)Versions (8)Used By (0)

Eloquent Filters
================

[](#eloquent-filters)

Eloquent Filters provides you with the scaffolding to easily organise and add filters to your eloquent models. The primary purpose of this package is to help keep both models and controllers clean by helping you to extract search / filter logic into well defined, dedicated classes.

It is created and maintained by the [Netsells team](https://netsells.co.uk/)

Key Features
------------

[](#key-features)

- Setup is extremely easy. Publish a config file then apply a trait to your models and you're done.
- Gives you an alternative to filling your models full scopes or controllers full of query logic.
- Provides the foundation for greater reuse of filter logic across different models.

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

[](#installation)

using composer:

```
composer require netsells/eloquent-filters

```

Then publish the config file using the following artisan command:

```
php artisan vendor:publish --tag=eloquent-filters

```

Usage
-----

[](#usage)

### Basic Usage

[](#basic-usage)

Once you have published the config add the `Netsells\EloquentFilters\Traits\HasFilters` trait to any models that you wish to add filters to.

```
