Skip to content
Laravel 10 · 11 · 12 · 13

Eloquent filters,without the controller noise.

Turn request data into expressive, secure queries through four purpose-built engines—without scattering conditional logic across your application.

4 filter engines1 fluent API0 controller clutter
PostController.phpready
Live pipeline
01 Request02 Payload03 Query
Validated
Invokable
Generated query8 matching posts
12ms
Scroll to explore
Payload-firstRelation-awareValidatedSanitizedCache-readyObservable Payload-firstRelation-awareValidatedSanitizedCache-readyObservable
One package, four approaches

Choose the request contract.
Keep the same fluent query.

Each engine solves a different API shape. Start simple, go deeply relational, or accept complex boolean trees without rewriting your application layer.

A predictable runtime

From untrusted input
to a clean query.

Every condition follows one visible lifecycle, so behavior stays testable as filtering grows.

See how the runtime works
01

Authorize

Decide whether the current user may apply a filter before it touches the query.

02

Validate

Use familiar Laravel rules to reject malformed request data with useful errors.

03

Transform

Trim, cast, map, sanitize, or enrich values through a consistent Payload.

04

Apply

Generate direct or relational Eloquent constraints and record the outcome.

PostFilter.phpPHP 8.2+
class PostFilter extends Filterable
{
    protected $filters = ['status', 'search'];

    #[Trim]
    protected function search(Payload $payload): Builder
    {
        return $this->builder->where(
            'title', 'like', $payload->asLike('both')
        );
    }
}
Complex when you need it

Your API shape.
Your engine.

Switch approaches without losing the package features around them. All engines share the same builder integration, operator pipeline, runtime context, and observability.

  • Automatic builder forwarding
  • Explicit field and operator allowlists
  • Direct and deeply nested relations
  • Strict or permissive error handling
More than query conditions

Built for real APIs.

The surrounding tools are part of the package—not an afterthought you have to rebuild in every project.

AI-ready docs

Give your coding assistant
the right context.

Download the official package instructions so AI tools use the current APIs, choose the right engine, and avoid legacy patterns.

Ready when your API is

Build filters that stay
pleasant to maintain.

Powered by Kettasoft