PHPackages                             hnhdigital-os/laravel-dynamic-filter - 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. hnhdigital-os/laravel-dynamic-filter

Abandoned → [hnhdigital-os/laravel-model-search](/?search=hnhdigital-os%2Flaravel-model-search)ArchivedLibrary[Search &amp; Filtering](/categories/search)

hnhdigital-os/laravel-dynamic-filter
====================================

Provides dynamic attribute filtering for Laravel's Eloquent Model.

264PHP

Since Sep 25Pushed 7y agoCompare

[ Source](https://github.com/hnhdigital-os/laravel-dynamic-filter)[ Packagist](https://packagist.org/packages/hnhdigital-os/laravel-dynamic-filter)[ RSS](/packages/hnhdigital-os-laravel-dynamic-filter/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Dynamic Filtering
=========================

[](#laravel-dynamic-filtering)

[![#f03c15](https://camo.githubusercontent.com/0f961518a7ec2afddbe358d250696841250391fd10d08f87047ec0e63321be23/68747470733a2f2f706c616365686f6c642e69742f31352f6630336331352f3030303030303f746578743d2b)](https://camo.githubusercontent.com/0f961518a7ec2afddbe358d250696841250391fd10d08f87047ec0e63321be23/68747470733a2f2f706c616365686f6c642e69742f31352f6630336331352f3030303030303f746578743d2b) This package has been discontinued. Consider using [Model Search](https://github.com/hnhdigital-os/laravel-model-search) and [Model Search Components](https://github.com/hnhdigital-os/laravel-search-components)

Provides the ability to set filtering attributes and model relationship filtering.

[![Latest Stable Version](https://camo.githubusercontent.com/ad6f1660daa24050a49f55f6bebffa24966e03c5baae75b84323b82221ebf58f/68747470733a2f2f706f7365722e707567782e6f72672f686e686469676974616c2d6f732f6c61726176656c2d64796e616d69632d66696c7465722f762f737461626c652e737667)](https://packagist.org/packages/hnhdigital-os/laravel-dynamic-filter) [![Total Downloads](https://camo.githubusercontent.com/967de1636df5d4cd482da7588af19dbcf216e5e01e5b0499d360103cae518569/68747470733a2f2f706f7365722e707567782e6f72672f686e686469676974616c2d6f732f6c61726176656c2d64796e616d69632d66696c7465722f646f776e6c6f6164732e737667)](https://packagist.org/packages/hnhdigital-os/laravel-dynamic-filter) [![Latest Unstable Version](https://camo.githubusercontent.com/6fdabe75a3268b6393ab299c6bf7332bade0879bdd307876bc6150407eb56ebd/68747470733a2f2f706f7365722e707567782e6f72672f686e686469676974616c2d6f732f6c61726176656c2d64796e616d69632d66696c7465722f762f756e737461626c652e737667)](https://packagist.org/packages/hnhdigital-os/laravel-dynamic-filter) [![License](https://camo.githubusercontent.com/47552c330d91a1b7650bc68b4034feadf8d52fbfb638ca0fbae29e75545d084e/68747470733a2f2f706f7365722e707567782e6f72672f686e686469676974616c2d6f732f6c61726176656c2d64796e616d69632d66696c7465722f6c6963656e73652e737667)](https://packagist.org/packages/hnhdigital-os/laravel-dynamic-filter)

[![Build Status](https://camo.githubusercontent.com/24651e4979468d55bc2bac18bfa3903a1350df3ca2fb656a2ec4b7ad90f63c23/68747470733a2f2f7472617669732d63692e6f72672f686e686469676974616c2d6f732f6c61726176656c2d64796e616d69632d66696c7465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/hnhdigital-os/laravel-dynamic-filter) [![StyleCI](https://camo.githubusercontent.com/83a255b79bfdc562a68b56c2a063c329ea9767ab22cd657245c83bb8225799f4/68747470733a2f2f7374796c6563692e696f2f7265706f732f36313534333431312f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/61543411) [![Test Coverage](https://camo.githubusercontent.com/337159c5628106ec3a6338084d51656b8d1294f020f602d7cf4baa6ed473eff5/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f686e686469676974616c2d6f732f6c61726176656c2d64796e616d69632d66696c7465722f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/hnhdigital-os/laravel-dynamic-filter/coverage) [![Issue Count](https://camo.githubusercontent.com/fb83edd4f69da428c49717839bf1e1abafc0d122aa4e82878a98fd0b63f74c61/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f686e686469676974616c2d6f732f6c61726176656c2d64796e616d69632d66696c7465722f6261646765732f69737375655f636f756e742e737667)](https://codeclimate.com/github/hnhdigital-os/laravel-dynamic-filter) [![Code Climate](https://camo.githubusercontent.com/185231798fb13e543f67a9c52c1379b43ed00f05104268e5f9f0894cbdbf2023/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f686e686469676974616c2d6f732f6c61726176656c2d64796e616d69632d66696c7465722f6261646765732f6770612e737667)](https://codeclimate.com/github/hnhdigital-os/laravel-dynamic-filter)

This package has been developed by H&amp;H|Digital, an Australian botique developer. Visit us at [hnh.digital](http://hnh.digital).

Install
-------

[](#install)

Via composer:

`$ composer require hnhdigital-os/laravel-dynamic-filter dev-master`

Usage
-----

[](#usage)

```
use Bluora\LaravelDynamicFilter\Traits\ModelTrait;

class User extends Model
{
    use ModelTrait;

    /**
     * A nice name for the model.
     *
     * @var array
     */
    protected $filter_name = 'User';

    /**
     * A list of relationships for this model.
     *
     * @var array
     */
    protected $filter_relationships = [
        'Organization' => 'App\Models\Organization'
    ];

    /**
     * A list of attributes that can be used for the advanced filtering trait.
     *
     * @var array
     */
    protected $filter_attributes = [
        'lookup' => [
            'name' => 'Name or email',
            'attribute' => ['first_name', 'last_name', 'email', 'organization.name'],
            'filter' => 'string',
            'search_tab_only' => true,
            'with' => 'organization'
        ],
        'first_name' => ['name' => 'First name', 'attribute' => 'first_name', 'filter' => 'string'],
        'last_name' => ['name' => 'Last name', 'attribute' => 'last_name', 'filter' => 'string'],
        'email' => ['name' => 'Email', 'attribute' => 'email', 'filter' => 'string'],
        'is_active' => ['name' => 'Active user', 'attribute' => 'is_active', 'filter' => 'boolean']
    ];
}
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/hnhdigital-os/laravel-dynamic-filter/blob/master/CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Rocco Howard](https://github.com/therocis)
- [All Contributors](https://github.com/hnhdigital-os/laravel-dynamic-filter/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/hnhdigital-os/laravel-dynamic-filter/blob/master/LICENSE) for more information.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/5270e3a3d1add4e39f12dfde3ce549999a26f759d7128056083ab07f475259f2?d=identicon)[bluora](/maintainers/bluora)

---

Top Contributors

[![RoccoHoward](https://avatars.githubusercontent.com/u/227896?v=4)](https://github.com/RoccoHoward "RoccoHoward (77 commits)")

### Embed Badge

![Health badge](/badges/hnhdigital-os-laravel-dynamic-filter/health.svg)

```
[![Health](https://phpackages.com/badges/hnhdigital-os-laravel-dynamic-filter/health.svg)](https://phpackages.com/packages/hnhdigital-os-laravel-dynamic-filter)
```

###  Alternatives

[ruflin/elastica

Elasticsearch Client

2.3k50.4M203](/packages/ruflin-elastica)[opensearch-project/opensearch-php

PHP Client for OpenSearch

15024.3M65](/packages/opensearch-project-opensearch-php)[mailerlite/laravel-elasticsearch

An easy way to use the official PHP ElasticSearch client in your Laravel applications.

934529.3k2](/packages/mailerlite-laravel-elasticsearch)[massive/search-bundle

Massive Search Bundle

721.4M13](/packages/massive-search-bundle)[shyim/opensearch-php-dsl

OpenSearch/Elasticsearch DSL library

175.9M9](/packages/shyim-opensearch-php-dsl)[outl1ne/nova-multiselect-filter

Multiselect filter for Laravel Nova.

45802.7k3](/packages/outl1ne-nova-multiselect-filter)

PHPackages © 2026

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