PHPackages                             aedart/athenaeum-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. [HTTP &amp; Networking](/categories/http)
4. /
5. aedart/athenaeum-filters

ActiveLibrary[HTTP &amp; Networking](/categories/http)

aedart/athenaeum-filters
========================

Search filter utilities, based on http query parameters

9.25.1(2w ago)02.2k↓64.7%BSD-3-ClausePHPPHP ^8.3

Since Nov 16Pushed 2w ago1 watchersCompare

[ Source](https://github.com/aedart/athenaeum-filters)[ Packagist](https://packagist.org/packages/aedart/athenaeum-filters)[ Docs](https://aedart.github.io/athenaeum/)[ RSS](/packages/aedart-athenaeum-filters/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (7)Versions (125)Used By (0)

Athenaeum Filters
=================

[](#athenaeum-filters)

Offers a way to create search and constraint [query filters](https://aedart.github.io/athenaeum/archive/current/database/query), based on received http query parameters, for your [Laravel](https://laravel.com/) application.

Example
-------

[](#example)

**Your custom filters builder**

By extending the `BaseBuilder` abstraction, you can encapsulate a custom filters builder. Whenever a http query parameter is matched, a corresponding "processor" is invoked, which is responsible for creating one or more query filters.

```
namespace Acme\Filters;

use Aedart\Filters\BaseBuilder;
use Acme\Filters\Processors\MySearchProcessor;
use Acme\Filters\Processors\TextProcessor;
use Acme\Filters\Processors\DateProcessor;
use Acme\Filters\Processors\SortProcessor;

class UserFilterBuilder extends BaseBuilder
{
    public function processors(): array
    {
        // Key = http query parameter, value = parameter processor...
        return [
            'search' => MySearchProcessor::make(),

            'name' => TextProcessor::make(),

            'created_at' => DateProcessor::make(),

            'sort' => SortProcessor::make()
                ->force(),

            // ...etc
        ];
    }
}
```

**In your request**

To use your custom filters builder, create a new instance in your request, e.g. in the [after validation hook](https://laravel.com/docs/8.x/validation#after-validation-hook).

```
namespace Acme\Requests;

use Illuminate\Foundation\Http\FormRequest;
use Aedart\Contracts\Filters\BuiltFiltersMap;
use Acme\Filters\UserFilterBuilder;

class ListUsersRequest exends FormRequest
{
    public BuiltFiltersMap|null $filters = null;

    public function after(Validator $validator)
    {
        // Add filters using your custom builder
        $this->filters = UserFilterBuilder::make($this)
            ->build();
    }

    // ... remaining not shown ...
}
```

**In your controller**

Lastly, apply the filters directly on your model.

```
use App\Http\Controllers\Controller;
use App\Models\User;
use Acme\Requests\ListUsersRequest;

class UsersController extends Controller
{
    public function index(ListUsersRequest $request)
    {
        // Apply all requested filters...
        return User::applyFilters($request->filters->all())
            ->paginate(10);
        );
    }
}
```

Official Documentation
----------------------

[](#official-documentation)

Please read the [official documentation](https://aedart.github.io/athenaeum/) for additional information.

The mono repository is located at [github.com/aedart/athenaeum](https://github.com/aedart/athenaeum)

Versioning
----------

[](#versioning)

This package follows [Semantic Versioning 2.0.0](http://semver.org/)

License
-------

[](#license)

[BSD-3-Clause](http://spdx.org/licenses/BSD-3-Clause), Read the LICENSE file included in this package

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance96

Actively maintained with recent releases

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

 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.

###  Release Activity

Cadence

Every ~12 days

Total

124

Last Release

19d ago

Major Versions

5.27.0 → 6.0.02022-04-05

6.8.1 → 7.0.02023-02-16

7.33.0 → 8.0.02024-03-18

8.22.0 → 9.0.02025-03-04

PHP version history (6 changes)5.22.0PHP &gt;=7.4.0

6.0.0PHP ^8.0.2

7.0.0PHP ^8.1

7.21.0PHP ^8.1.22

8.0.0PHP ^8.2

9.0.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/0b0ca9598955b15d361ffb37656bc1a2e698e8f0850645c1c3872f0b018ac9d2?d=identicon)[aedart](/maintainers/aedart)

---

Top Contributors

[![aedart](https://avatars.githubusercontent.com/u/1523223?v=4)](https://github.com/aedart "aedart (285 commits)")

---

Tags

httpapisearchfiltersAthenaeum

### Embed Badge

![Health badge](/badges/aedart-athenaeum-filters/health.svg)

```
[![Health](https://phpackages.com/badges/aedart-athenaeum-filters/health.svg)](https://phpackages.com/packages/aedart-athenaeum-filters)
```

###  Alternatives

[nategood/httpful

A Readable, Chainable, REST friendly, PHP HTTP Client

1.8k17.0M254](/packages/nategood-httpful)[quickbooks/payments-sdk

The Official PHP SDK for QuickBooks Online Payments API

2757.7k1](/packages/quickbooks-payments-sdk)[jsor/hal-client

A lightweight client for consuming and manipulating Hypertext Application Language (HAL) resources.

2225.8k1](/packages/jsor-hal-client)[laragear/api-manager

Manage multiple REST servers to make requests in few lines and fluently.

161.8k](/packages/laragear-api-manager)

PHPackages © 2026

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