PHPackages                             laravel-enso/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. laravel-enso/filters

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

laravel-enso/filters
====================

Search and interval helpers for Laravel Enso

3.0.3(2mo ago)041.6k↑88.5%27MITPHPPHP ^8.0CI failing

Since Mar 23Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/laravel-enso/filters)[ Packagist](https://packagist.org/packages/laravel-enso/filters)[ Docs](https://github.com/laravel-enso/filters)[ RSS](/packages/laravel-enso-filters/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (2)Versions (43)Used By (7)

Filters
=======

[](#filters)

[![License](https://camo.githubusercontent.com/dc164ff49a90d58f35343cbfa4d628272ef92674b310f487f54c9e846a4a4a32/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2d656e736f2f66696c746572732f6c6963656e7365)](LICENSE)[![Stable](https://camo.githubusercontent.com/dfed00589bd7c98ce2a308077e6df54d132e98e194dc7f325d6a9ee2b1fd7c8a/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2d656e736f2f66696c746572732f76657273696f6e)](https://packagist.org/packages/laravel-enso/filters)[![Downloads](https://camo.githubusercontent.com/89a31becb0702f898759c724258b38325c1d7f4e3779015e8ef9b4b492f5c13b/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2d656e736f2f66696c746572732f646f776e6c6f616473)](https://packagist.org/packages/laravel-enso/filters)[![PHP](https://camo.githubusercontent.com/ef6afd4ccdaa708a9b1a0a353d6d03a13ca1f03887b8db701d4118dc30a6735a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e302532422d3737376262342e737667)](composer.json)[![Issues](https://camo.githubusercontent.com/4759cde1765111e6b1ac227d9ab42930f9346f68682612eda5d6968830478ddd/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6c61726176656c2d656e736f2f66696c746572732e737667)](https://github.com/laravel-enso/filters/issues)[![Merge Requests](https://camo.githubusercontent.com/4345d6800505ae8ba01530151a9760b405351fce4cdf5fe106f19907532af2de/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d70722f6c61726176656c2d656e736f2f66696c746572732e737667)](https://github.com/laravel-enso/filters/pulls)

Description
-----------

[](#description)

Filters provides reusable search and date-interval helpers for Laravel Enso and standalone Laravel code.

The package includes a query search helper that supports multiple search modes and relation-aware matching, plus an interval iterator that builds hourly, daily, monthly, or yearly segments across predefined or custom ranges.

It has no routes or migrations. It is a pure helper package.

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

[](#installation)

Install the package:

```
composer require laravel-enso/filters
```

Features
--------

[](#features)

- Full-text, exact-match, starts-with, ends-with, and negated search modes.
- Support for custom comparison operators.
- Search across direct attributes and related attributes.
- Interval generation for today, week, month, year, custom, and all-time ranges.
- Time-segment labels suitable for charts and aggregate dashboards.

Usage
-----

[](#usage)

Search a query:

```
use LaravelEnso\Filters\Services\Search;

$query = new Search(User::query(), ['name', 'email'], 'john');
$results = $query->handle();
```

Build an interval:

```
use LaravelEnso\Filters\Enums\Intervals;
use LaravelEnso\Filters\Services\Interval;

$interval = new Interval(Intervals::ThisMonth);
```

Manual intervals require both limits:

```
use Carbon\Carbon;
use LaravelEnso\Filters\Enums\Intervals;
use LaravelEnso\Filters\Services\Interval;

$interval = new Interval(
    Intervals::Custom,
    min: Carbon::parse('2026-05-01 00:00:00'),
    max: Carbon::parse('2026-05-01 23:59:59'),
);
```

Validation failures are returned as `LaravelEnso\Helpers\Exceptions\EnsoException`by default, which keeps UI/API consumers aligned with the standard Enso error response. Pass `ui: false` when using the service outside the UI layer and you need the native `LaravelEnso\Filters\Exceptions\Interval` exception:

```
new Interval(Intervals::Custom, ui: false);
```

API
---

[](#api)

### Services

[](#services)

- `LaravelEnso\\Filters\\Services\\Search`
- `LaravelEnso\\Filters\\Services\\Interval`

### Enums

[](#enums)

- `ComparisonOperators`
- `SearchModes`
- `Intervals`
- `TimeSegments`
- `Operations`
- `Adjustments`

Depends On
----------

[](#depends-on)

Required Enso packages:

- [`laravel-enso/helpers`](https://docs.laravel-enso.com/backend/helpers.html) [↗](https://github.com/laravel-enso/helpers)

Companion frontend package:

- [`@enso-ui/filters`](https://docs.laravel-enso.com/frontend/filters.html) [↗](https://github.com/enso-ui/filters)

Contributions
-------------

[](#contributions)

are welcome. Pull requests are great, but issues are good too.

Thank you to all the people who already contributed to Enso!

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance87

Actively maintained with recent releases

Popularity29

Limited adoption so far

Community26

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 56.5% 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 ~67 days

Recently: every ~18 days

Total

34

Last Release

65d ago

Major Versions

1.0.12 → 2.0.02020-06-25

2.4.0 → 3.0.02026-04-09

PHP version history (3 changes)1.0.0PHP &gt;=7.4.0

2.0.4PHP &gt;=8.0

2.2.0PHP ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16073274?v=4)[Adrian Ocneanu](/maintainers/aocneanu)[@aocneanu](https://github.com/aocneanu)

---

Top Contributors

[![aocneanu](https://avatars.githubusercontent.com/u/16073274?v=4)](https://github.com/aocneanu "aocneanu (26 commits)")[![gandesc](https://avatars.githubusercontent.com/u/14071925?v=4)](https://github.com/gandesc "gandesc (8 commits)")[![vmcvlad](https://avatars.githubusercontent.com/u/37445394?v=4)](https://github.com/vmcvlad "vmcvlad (7 commits)")[![AbdullahiAbdulkabir](https://avatars.githubusercontent.com/u/33360580?v=4)](https://github.com/AbdullahiAbdulkabir "AbdullahiAbdulkabir (2 commits)")[![GITmanuela](https://avatars.githubusercontent.com/u/44998004?v=4)](https://github.com/GITmanuela "GITmanuela (2 commits)")[![raftx24](https://avatars.githubusercontent.com/u/10864136?v=4)](https://github.com/raftx24 "raftx24 (1 commits)")

---

Tags

filterslaravel-ensodate-interval

### Embed Badge

![Health badge](/badges/laravel-enso-filters/health.svg)

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

###  Alternatives

[laravel-enso/tables

Server-side data tables and export backend for Laravel Enso

63355.1k84](/packages/laravel-enso-tables)[laravel-enso/forms

JSON-based form builder for Laravel Enso

12354.2k85](/packages/laravel-enso-forms)[laravel-enso/data-import

Excel Importer dependency for Laravel Enso

2044.0k6](/packages/laravel-enso-data-import)[laravel-enso/select

Server-side option and typeahead builders for Laravel Enso

2661.2k72](/packages/laravel-enso-select)[laravel-enso/tutorials

Tutorial management backend for Laravel Enso

1140.7k](/packages/laravel-enso-tutorials)[laravel-enso/charts

Backend chart payload builders for Laravel Enso

1762.8k8](/packages/laravel-enso-charts)

PHPackages © 2026

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