Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Nova Searchable Filter Laravel Package

sereny/nova-searchable-filter

A Laravel Nova filter package that adds searchable select filters to your admin panels, letting you narrow resources by related records through a searchable dropdown instead of long, unwieldy option lists.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit The package is a presentation-layer extension for Laravel Nova: one PHP class extending Laravel\Nova\Filter plus a compiled Vue component registered through Nova::script() / Nova::style(). It carries no migrations, no domain coupling, and no service-provider surface beyond asset registration. That makes it architecturally "cheap" — it touches only the admin panel and can be removed without residue in application code.

Fit is narrow and conditional:

  • The application must run Laravel Nova. If the admin surface is Filament, Backpack, or bespoke Blade, fit is zero.
  • The resource must have a belongsTo filter whose parent table is large enough that a full <select> is painful — practically, more than ~500 candidate rows. Below that threshold, Nova's default select is adequate and this adds unnecessary dependency surface.
  • The belongsTo target resource must define searchable columns, otherwise the search returns unfiltered/empty results and the feature is cosmetic.

Integration feasibility Low effort. composer require, publish assets, add a filter class per relationship, register in the resource's filters() method. Realistic estimate: half a day for the first filter including verification, ~15 minutes per additional filter. No Node toolchain required if compiled assets are committed to the repository — which must be verified, because if they are not, you inherit a Vue build (nova.mix, Vue 3) just to install.

Technical risk The signals are poor and should drive the decision more than the feature value:

  • Staleness. Last release 2023-08-11 predates Nova 5 (Dec 2024). Nova majors ship breaking changes to the custom-component contract, which is largely undocumented internal API.
  • Bus factor. Four stars, zero dependents, single maintainer. There is no community validation — no one else has exercised this against edge cases you will hit.
  • Supply chain. A compiled JS bundle from an unvetted third party running inside an authenticated admin panel warrants a source review and a check that dist/ matches tagged source.
  • Blast radius is contained. Worst case is a broken or empty filter in the admin UI, not data loss or a production outage. That asymmetry is why a time-boxed spike is defensible.

Key questions

  1. Which Nova major is in use? If Nova 5, assume incompatibility until proven otherwise.
  2. Does Nova's native Select field with searchable() already work inside a filter? If so, this package is redundant and the correct answer is "build nothing."
  3. Does the search request hit Nova's authorized index endpoint, and does it respect the related resource's viewAny policy and global scopes?
  4. Is dist/ committed and reproducible from package.json? What does npm audit report?
  5. What is the license, and are we permitted to fork and vendor it internally?
  6. Who owns the fork if we adopt it?

Integration Approach

Stack fit Target: Laravel 9/10, PHP 8.1+, Nova 4.x. Verify composer.json constraints against the actual application before committing — a loose ^4.0 constraint can silently pull an incompatible Nova minor. Treat Nova 3 and Nova 5 as unsupported.

Migration path There is no data migration; the change is purely additive and reversible by deleting the filter class. Two viable paths:

  • Path A — dependency. Standard composer require. Fastest, but you accept an unmaintained transitive dependency in an admin-critical path.
  • Path B — vendor/fork (recommended). The package is small enough to copy the filter class and Vue component into nova-components/ as first-party code. Estimated 1–2 developer days to internalize, add CI (composer validate, npm audit, a smoke test), and establish ownership. You get the feature without the abandonment risk.

Compatibility Pin an exact version. Run the spike against both the oldest and newest Nova minor in the fleet. Audit the JS dependency tree for CVEs, and confirm the shipped bundle corresponds to tagged source before it goes anywhere near production.

Sequencing

  1. Spike on staging against a realistic copy of the largest belongsTo table (not a 20-row fixture).
  2. Establish the baseline: does native Nova Select::make()->searchable() satisfy the requirement inside a filter? Document the answer — this is the decision gate.
  3. Decide adopt / fork / build-nothing, with the fork favored unless the native path fails.
  4. If forking: internal repo, CI, named owner, README documenting the Nova version it targets.
  5. Roll out to a single resource, observe query load for two weeks, then broaden.

Operational Impact

Maintenance Effectively unmaintained upstream — assume any defect is yours to fix. Nova ships a major roughly annually, and each one will likely require a Vue component update: budget 1–2 developer days per Nova major for a fork, or an unquantified outage window if you took the dependency and the maintainer is absent.

Support No vendor, no SLA, no issue-triage guarantee. A named internal owner is mandatory, and the filter classes should be documented in the admin runbook so the next engineer does not rediscover this by archaeology.

Scaling This is the under-appreciated risk. Search is a per-keystroke HTTP request to Nova's index endpoint, which by default translates to LIKE '%term%' — a pattern that cannot use a B-tree index and therefore full-scans the parent table. Mitigations:

  • Enforce a 300ms debounce and cap returned results.
  • Ensure the searched column is indexed; accept that non-prefix LIKE still won't use it.
  • Above ~100k rows in the parent table, require a dedicated search index or restrict to prefix matching. Decide this threshold before rollout, not after the first slow-query alert.

Failure modes

  • Nova upgrade silently breaks the compiled component → filter renders blank or throws in console; nobody notices until a support ticket.
  • Related resource's viewAny policy denies the user → empty dropdown indistinguishable from "no matching records," producing quiet operational confusion.
  • Asset collision with other Nova custom tools (duplicate select2-style globals) → filter fails to initialize.
  • Missing debounce → query storm under bulk admin usage.

All of these degrade the admin UX; none corrupt data. That is the strongest argument in the package's favor, and also the reason not to over-invest in it.

Ramp-up Low. Under a day for a Laravel developer already comfortable with Nova. If forking, add the cost of Nova custom-component literacy (Vue 3, nova.mix, asset registration) — call it an additional day, and treat that knowledge as a reusable asset rather than a cost.

Recommendation With four stars, zero dependents, and eighteen months of inactivity, this should be treated as a reference implementation, not a dependency. Run the one-day spike, confirm whether native Nova already covers the requirement, and if it does not, vendor the roughly 200 lines of code under internal ownership.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
cgv/localized-resource