pos-lifestyle/laravel-nova-date-range-filter
Add a date range filter to Laravel Nova resources with this lightweight package. Let users narrow resource lists by custom start and end dates, making date-based records easier to search and review in Nova admin panels.
Architecture fit. The package is a narrow Nova-only extension: a filter class that compiles to a whereBetween clause plus a Vue component rendered in Nova’s filter panel. It fits cleanly where the org already standardizes on Laravel Nova for internal admin tooling and needs a simple inclusive date range on resource index screens. It is not an analytics, reporting, or customer-facing component, and it does not provide relative ranges, saved ranges, or multi-tenant scoping.
Integration feasibility. Feasible only after version validation. The package was last released in July 2021, has 16 stars, zero dependents, and no vendor support. The TPM should treat adoption as a code donation, not a maintained dependency: verify Composer resolution on the exact PHP/Laravel/Nova versions, read src/ and Filter.vue to confirm the payload shape, register on one resource, and log the compiled SQL before trusting output. Nova 4 is plausible; Nova 5 should be considered unproven until demonstrated.
Technical risk. The dominant risk is Nova/Vue compatibility. Secondary risks are end-of-day exclusivity, timezone drift between naive browser dates and UTC storage, nullable columns silently dropping rows, unindexed date columns causing full scans, and asset pipeline breakage under Nova’s Vite-era tooling. Because upstream is inactive, every future Laravel/PHP/Nova upgrade carries a compatibility check and likely fork-and-repackage work.
Key questions. Which Nova major version are we on, and has the component rendered successfully in a scratch branch? What exact payload does the Vue component send: {start, end} or {from, to}, date-only or ISO? Does the upper bound include the whole end day? Are query boundaries normalized to UTC, and in which timezone are dates parsed? What should happen to NULL values on nullable columns such as paid_at? Is the target date column indexed on representative data volumes? Who owns the fork if we adopt it?
Stack fit. Use only where Laravel Nova is already the internal admin surface. The best fit is back-office productivity and support tooling: orders, bookings, invoices, users, audit logs, support investigation windows, finance reconciliation bounds, and compliance review periods. Do not position it as a reporting foundation or customer-facing capability.
Migration path. Start with a scratch branch and a single resource-local registration. Run composer require pos-lifestyle/laravel-nova-date-range-filter, then immediately inspect the package composer.json constraints. Register the filter on one index screen, for example DateRangeFilter::make('Created')->column('created_at'), and log the compiled SQL and bindings. Validate three things before expanding: bindings match expectations, the end day is fully included, and the date column is indexed. Only after that should the team consider global registration or reuse on Nova metric cards.
Compatibility. Pin the version and assume ownership if adopted. Wrap registration behind a small project-level factory or base class so replacing the package with an in-house filter later is a one-file change. If Nova compatibility fails, fork the MIT code, repackage the Vue component against the supported Nova version, and add compatibility tests rather than debugging the shipped bundle.
Sequencing. First, validate in isolation: Composer resolution, component render, payload shape, SQL bindings, end-of-day semantics, timezone behavior, nullable behavior, and index usage. Second, pilot on one low-risk resource. Third, define the internal convention and fork/pin policy. Fourth, expand to additional resources and only then to dashboard cards where consistent “last 30 days” semantics across surfaces is the real product win. If validation fails, stop and convert the effort into a short in-house build ticket.
Maintenance. Adoption means assuming maintenance ownership. There is no upstream roadmap, support contract, or security response. Budget recurring compatibility checks at every Laravel/PHP/Nova upgrade, with high likelihood of hard breakage on a future Nova major. The sustainable path is to vendor the MIT code internally, pin it, name an owner, and test it against the supported Nova version.
Support. Support load should be low if the filter is scoped to internal ops screens with a small blast radius. The predictable tickets are “wrong rows” from end-of-day or timezone handling, “missing rows” from nullable columns, and “blank filter” from asset or Vue compatibility failures. Document the intended semantics for each registered column, especially nullable date fields, so support can distinguish a filter bug from a business-rule question.
Scaling. The filter clause is cheap only when the date column is indexed. Broad custom ranges against unindexed columns on large admin tables will turn a filter into a full scan. Review query plans on representative row counts before broad rollout, keep pagination in place, and avoid stacking multiple date-range filters on very large tables without measuring.
Failure modes. Blank popover, missing filter, or Vue console errors indicate Nova/Vue incompatibility or asset publishing failure. Wrong rows indicate end-of-day exclusivity or timezone drift. Missing nullable records indicate whereBetween semantics. Slow queries indicate missing indexes before assuming filter logic. Any of these on a critical reporting workflow is expensive; that is why the package should stay on internal, non-critical admin surfaces.
Ramp-up. Engineering ramp-up is low: the API surface is small, and the source is readable in roughly ten minutes. TPM ramp-up is mostly validation discipline and ownership framing. The decision should be presented as borrow-and-own versus build-and-own, not as buy versus build. If the organization has a policy against stale or low-adoption dependencies, the honest deliverable is a short in-house build ticket rather than an exception for this package.
How can I help you explore Laravel packages today?