Laravel EnsoLaravel Enso
Guide
Back End
Front End
GitHub
Guide
Back End
Front End
GitHub
  • Back End

    • Action Logger
    • Addresses
    • Algolia
    • Algolia Webshop
    • API
    • Audits
    • Avatars
    • Cache Chain
    • Calendar
    • Cargo Partner
    • Categories
    • Charts
    • CI/CD
    • Cli
    • CNP Validator
    • Comments
    • Commercial
    • Companies
    • Core
    • Countries
    • Currencies
    • Data Export
    • Data Import
    • Discounts
    • Documents
    • Dynamic Methods
    • EAV
    • Emag
    • Enums
    • Excel
    • Facebook
    • Files
    • Filters
    • Financials
    • Forms
    • Frisbo
    • Google
    • Helpers
    • Holidays
    • How-to
    • Image Transformer
    • Impersonate
    • Interactions
    • Inventory
    • IO
    • Localisation
    • Lockable Models
    • Logs
    • Measurement Units
    • Meili Search
    • Meili Search Webshop
    • Menus
    • Migrator
    • Monitored Emails
    • Notifications
    • Packaging Units
    • PDF
    • People
    • Permissions
    • Product Eav
    • Product Lots
    • Products
    • Questionnaires
    • Rememberable
    • Roles
    • Sale Channels
    • Searchable
    • Select
    • Sentry
    • Services
    • Smart Bill
    • Sms Advert
    • Stripe
    • Tables
    • Tasks
    • Teams
    • Ticketing
    • Track Who
    • Tutorials
    • Typesense
    • Typesense Webshop
    • Unit Conversion
    • Upgrade
    • UPS
    • User Groups
    • Users
    • Versions
    • Virtual Call Center
    • Vouchers
    • Webshop
    • Webshop Commercial

Filters

LicenseStableDownloadsPHPIssuesMerge Requests

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

Install the package:

composer require laravel-enso/filters

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

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);

API

Services

  • LaravelEnso\\Filters\\Services\\Search
  • LaravelEnso\\Filters\\Services\\Interval

Enums

  • ComparisonOperators
  • SearchModes
  • Intervals
  • TimeSegments
  • Operations
  • Adjustments

Depends On

Required Enso packages:

  • laravel-enso/helpers ↗

Companion frontend package:

  • @enso-ui/filters ↗

Contributions

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

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

Edit this page on GitHub
Last Updated: 4/20/2026, 6:07:23 PM
Prev
Files
Next
Financials