optimistdigital/nova-input-filter
Adds a free-text input filter to Laravel Nova resource indexes, letting users type a value to narrow listings instead of choosing from preset options. Handy for quick name, email, or ID searches in admin panels. Lightweight and easy to register on any Nova resource.
Architecture fit: This package is a narrow extension point inside Laravel Nova's existing filter pipeline — not an architectural commitment. It ships an InputFilter base class whose apply(Request $request, $query, $value) method is overridden by the integrator to shape an Eloquent query from a free-text string. The footprint is one or two Nova resource classes plus a Composer dependency: no migrations, no domain-model changes, no coupling into the service layer. It composes alongside SelectFilter/BooleanFilter/DateFilter as a leaf node in the query chain. The single gating condition is that the organization has already standardized on Laravel Nova; for any other admin stack this package is inapplicable, and the filtering need should be solved in whatever framework is actually in use.
Integration feasibility: High for a Nova-fluent team, moderate otherwise. The realistic work is: composer require, confirm service-provider auto-discovery (the namespace moved from OptimistDigital to Outl1ne, so older tags may need manual registration), subclass InputFilter, override apply(), register it in the resource's filters(), and validate query behavior against real data. The package deliberately exposes almost no configuration — the meaningful behavior lives in the developer's override. That is simultaneously the strength (learning curve measured in hours) and the risk (all correctness, type handling, and injection safety belongs to the integrator, not the package).
Technical risk: The dominant risk is dependency risk, not technical complexity. Adoption signals are weak — 24 stars, 0 dependents, single-maintainer ecosystem — so scope this as replaceable tooling and never as a platform bet. It sits inside an enterprise-licensed framework whose own major upgrades are the most likely breakage vector: a Nova upgrade can break both the server-side base class and the bundled Vue input component simultaneously. Secondary risks: version coupling across Nova/Laravel/PHP; frontend asset compatibility (confirm whether assets ship precompiled or require a Node build); and query safety, since the raw user string is passed straight into apply() and the developer must guard blank values, cast types, and avoid whereRaw interpolation. The 2025-01-17 release is a positive maintenance signal but does not offset the low adoption. The apply() override is simple enough that an in-house replacement is roughly a day of engineering — which caps the downside and should be the stated mitigation, not a contingency discovered later.
Key questions: Which Nova, Laravel, and PHP versions does the current tag support, and does that match production? Are frontend assets precompiled or does the asset pipeline require Node? Does the bundled Vue component honor the documented $name/placeholder/value props, or does it need overrides? Does the filter respect Nova resource authorization and policies — i.e., can it surface rows the resource should hide? Can multiple InputFilter instances coexist on one resource with independent state? Is there any test coverage at all? And the decision the TPM must own before approval: what is the agreed fallback if the package stalls — fork or replace in-house — and who is accountable for that call?
Stack fit: Laravel + Laravel Nova only. Installation is Composer-based with service-provider auto-discovery; no migration or backfill is required because the filter is stateless configuration. If the application is not on Nova, stop here — this package is not applicable regardless of the underlying filtering need. The use case it serves best is an internal ops/support admin screen where users need to look up records by a typed value: email, name, reference ID, SKU, or ticket number.
Migration path: Configuration-level, not data-level. The realistic migration replaces one of three things: a manual global-search workaround, a built-in dropdown filter that fits free-text lookup poorly, or a hand-rolled Nova filter. Keep the existing mechanism in place until the new filter is validated in staging, and start with one high-value, low-risk resource (customers or orders are typical) where ops users already complain about lookup friction. Treat the pilot as a go/no-go gate: expand to additional resources only after it demonstrably reduces time-to-find or lookup requests.
Compatibility: Pin the exact package version and verify its Composer constraints against the production Nova/Laravel/PHP versions. Run CI against the same Nova version used in production, since Nova upgrades are the most likely breakage vector. Confirm the asset pipeline — if the bundled Vue component needs publishing or compiling, validate in the environment where Nova assets are actually served, not just locally. Because the namespace changed from OptimistDigital to Outl1ne, confirm which tag and which service provider apply to the installed version before writing integration code.
Sequencing: (1) Confirm Nova version and the specific filtering use case with the requesting ops/support team, and define the success metric up front (filter usage, reduced lookup time, fewer manual lookup requests). (2) Install on a development branch and register one filter on one resource. (3) Test query correctness — blank input, special characters, LIKE wildcards, numeric and ID casts, and fail-closed behavior on invalid input. (4) Confirm authorization boundaries: the filter must not expose records the resource policy should hide. (5) Review UX with actual admin users and capture feedback against the stated metric. (6) Expand to additional resources only if the pilot succeeds. (7) Document usage, version pinning, and the fork-or-replace fallback before wider rollout.
Maintenance: Low steady-state effort — the package is small, MIT-licensed, and recently released. But it lives in a single-maintainer ecosystem with near-zero adoption, so assign an internal owner to watch releases, GitHub issues, and Nova upgrade notes. Pin the version and block automatic major-version bumps. Budget a small annual keep/fork/replace review tied to the Nova upgrade calendar, since Nova upgrades are the most common trigger for breakage.
Support: Community-only via GitHub, with no commercial SLA and no vendor escalation path. The team must be operationally willing to fork the filter or reimplement it internally if it stalls; the apply() override pattern is simple enough that an in-house replacement is roughly a day of engineering, which caps the downside. Maintain a small internal test case for each registered filter so regressions surface in CI rather than in production ops. Make the support model explicit to stakeholders: this is a supported-by-us accelerator, not a vendor-supported product.
Scaling: Admin-side concurrency is typically low, so user scaling is not the concern — query performance is. An input filter can generate a LIKE '%term%' full scan on a large table, and the integrator controls that query entirely. Ensure filtered columns are indexed where practical; accept full scans only on small tables; review generated SQL under realistic row counts; prefer exact-match or prefix-match where the use case permits. Multi-column OR searches compound the cost, so keep them to a small, indexed column set. Treat any expansion onto a high-volume resource as a performance review item, not just a config change.
Failure modes: Likely failures are incompatibility after a Nova or Laravel upgrade; broken or uncompiled frontend assets; incorrect results from missing blank-value guards or bad type casts; SQL errors from special characters; overly broad filters that confuse users; and silent authorization gaps where the filter returns records the resource policy should restrict. Package abandonment is plausible given the adoption signals. Each needs a documented rollback — revert the version pin, disable the filter in filters(), or swap to a built-in or in-house filter. Rollback should be a config/PR-level action, not an incident response.
Ramp-up: For a developer already comfortable with Laravel Nova, a few hours to install, register, and validate one filter. For a team new to Nova, moderate — they must first understand Nova's filter lifecycle, resource authorization, and asset pipeline before the package itself is the easy part. Plan on pairing the first filter with a reviewer who knows the domain model, since correctness of the apply() query is where all the real risk sits. Training cost is negligible; the cost is in the review discipline around query safety and authorization.
How can I help you explore Laravel packages today?