webard/nova-eloquent-searchable
A Laravel Nova package that adds Eloquent-powered searchable fields and relationships to your admin panel, letting users quickly find related records with fast, query-backed search instead of long dropdowns.
Architecture fit. This is a Laravel Nova field package, which makes it a hard-gated dependency: it is only relevant if the organization already runs Nova (a paid, per-site licensed admin panel) as the back-office layer. It slots into Nova's field system — a PHP field class plus a compiled Vue component — and sits on top of Eloquent relations, so it inherits Laravel's ORM conventions and Nova's resource/authorization model rather than introducing a new data layer. There is no data migration, no schema change, and no runtime service of its own. That is the good news: blast radius is confined to admin UI. The bad news is that the addressable surface is small (only Nova-backed apps) and the package competes with Nova's own BelongsTo::searchable(), which ships in Nova 4 and covers the common "too many options for a select" case. The package's plausible differentiation is search backed by Laravel Scout / a search index rather than a LIKE query against the relational table — that must be confirmed before it justifies a dependency.
Integration feasibility. Mechanically simple: composer require, register the field in one or more Nova resources, optionally configure the searchable model/attribute, and rebuild or publish assets. A competent Laravel developer should reach a working field in under an hour. The real work is verification, not installation. Four things need to be confirmed by reading the source, not the README: (1) whether the search endpoint is served by Nova's authenticated routes and respects Laravel\Nova authorization and global scopes, or by an ad-hoc route — an unscoped search endpoint is a record-enumeration vector; (2) whether it supports only BelongsTo or also BelongsToMany/MorphTo; (3) whether it hard-requires Scout and which engines/drivers; (4) whether the Vue assets are precompiled in the release or require an npm run prod against a specific Nova major version.
Technical risk. High, and mostly attributable to project maturity rather than code quality. One star, zero dependents, and a single tagged release (2024-07-23) mean essentially no third-party validation — no one has hit the edge cases for you. Nova ships breaking front-end and field-API changes across majors, and a package that has not released in over a year is likely pinned to the Nova major current at that time; an upgrade of Nova could leave the field silently broken or crashing the resource form. Bus factor is one. There is no visible signal on test coverage or CI. Offset: the license is MIT, so the code can be vendored, audited, and forked in-house, and the scope is small enough that a fork is a day or two of work rather than a project.
Key questions. Which Nova versions (and Laravel/PHP versions) are actually supported, and does the constraint block our current stack? Does the search query pass through Nova's authorization and Eloquent global scopes, including multi-tenancy scopes? Is Scout mandatory, and if so, which driver? Is the search server-side paginated and debounced, or does it return an unbounded result set? Are compiled assets committed to the release? What happens when the search backend is unavailable — does the field degrade to a plain select, or hard-fail the form? Is there a maintained fork or an equivalent first-party path we should prefer?
Stack fit. Assumes Laravel 10/11, PHP 8.1+, Nova 4.x (possibly 5.x — verify), and optionally Laravel Scout with Meilisearch, Typesense, Algolia, or the database driver. If the team is already on Nova and already operating a Scout index for front-end or API search, this package is nearly free to adopt — the index and infrastructure are sunk costs. If neither Nova nor Scout is in place, adopting this package means adopting two platforms to solve a dropdown performance problem, which is not a credible business case.
Migration path. There is no data migration — this is a presentation and query layer only. The migration is at the field level: swap an existing BelongsTo for the searchable variant on one resource, keeping the underlying foreign key and column unchanged so rollback is a one-line revert. Where Nova's native BelongsTo::searchable() already satisfies the requirement, prefer it and treat this package as unnecessary; the migration path to the first-party field is the cheapest possible and should be the default unless Scout-backed search over very large tables is genuinely required.
Compatibility. Pin the exact package version in composer.json, and pin Nova alongside it. Check the composer.json constraints of the package directly rather than the README, and confirm the Nova major it was built against by reading the field class and the Vue component. If assets are not precompiled, budget for a local build pipeline and a lockfile you control. Any Nova upgrade should be treated as a breaking change for this field until proven otherwise — add it to the upgrade checklist explicitly.
Sequencing. (1) Source audit: 2–4 hours reading the field class, the search endpoint, and the authorization path — this is the gate, and a failure here ends the evaluation. (2) Sandbox spike against a staging Nova instance with a production-shaped table (millions of rows) and a real Scout index. (3) Single-resource pilot on a low-traffic admin resource, with logging on the search endpoint. (4) Authorization and tenancy tests, including a non-privileged Nova user attempting to surface records outside their policy scope. (5) Either promote to additional resources or fall back to core BelongsTo::searchable() and close the evaluation. Time-box the whole thing to roughly one sprint.
Maintenance. This is the dominant cost. A single-maintainer package with no dependents and no release in over a year should be assumed unmaintained, not merely quiet. Plan to own it: vendor the source into the repository or a private fork, or accept that the next Nova major leaves you either frozen or patching. MIT licensing makes the fork legitimate and cheap; the code surface is small enough to review completely. Assign a named owner, because third-party Nova fields with no upstream activity become orphaned silently — the application still builds, and the breakage only appears when someone opens the resource form.
Support. GitHub issues only, no SLA, and Nova's own support will not troubleshoot a third-party field — they will correctly point at the package. Internal escalation therefore terminates at the owning engineer. If the field is on a critical admin workflow (order assignment, account management), that is a real coverage gap; if it is a convenience on a rarely used resource, it is tolerable.
Scaling. Two distinct profiles. If the package uses an indexed search backend, it scales with that backend and search latency stays flat as the table grows — but you have added an operational dependency and its cost, and the admin panel now fails differently when the index is stale or the cluster is down. If it falls back to LIKE '%term%' against the relational table, it will do a full scan; that is acceptable at tens of thousands of rows, unacceptable at millions, and it will degrade gradually rather than at a cliff, which makes it easy to miss. Confirm debounce, minimum query length, and a hard result cap on the endpoint — an uncapped search endpoint is a cheap way for an authenticated user to load the admin panel or database.
Failure modes. Most likely first: the Vue component fails to render after a Nova upgrade, breaking the resource form for everyone who can see it. Second: the search endpoint omits or misapplies authorization scopes, exposing records across tenants or above the user's role — the highest-severity outcome, and the one most likely to be missed because the happy path works. Third: search backend outage produces an empty result set rather than an error, so operators silently conclude the record does not exist. Fourth: N+1 queries when the field renders the selected record's label on index and detail views at scale. Fifth: missing translations and stale asset builds after a rebase. Mitigate by keeping a documented rollback to the core field for each resource where it is deployed.
Ramp-up. Low technical ramp-up — any Laravel developer can install and configure it in an afternoon. The non-obvious cost is the verification work: authorization review, Nova-upgrade rehearsal, and rollback documentation. Budget a sprint including the spike and the fork-or-fallback decision. The honest recommendation is to run the source audit before anything else; given one star, zero dependents, and a stale release, the expected outcome is that core Nova BelongsTo::searchable() covers the requirement and this package is not worth the ownership burden — and it is only worth adopting in the narrower case where Scout-backed search over genuinely large related tables is a hard requirement and the audit confirms authorization is handled correctly.
How can I help you explore Laravel packages today?