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 Prepopulate Searchable

Nova Prepopulate Searchable Laravel Package

genealabs/nova-prepopulate-searchable

Nova Prepopulate Searchable pre-fills Laravel Nova's searchable select fields with their current values, so BelongsTo and similar relationships display the selected option correctly on create and edit forms instead of showing up blank.

View on GitHub
Deep Wiki
Context7

A tool to allow BelongsTo searchable fields to be pre-populated with data

Frequently asked questions about Nova Prepopulate Searchable
What does genealabs/nova-prepopulate-searchable actually do?
It pre-fills Laravel Nova's searchable BelongsTo and MorphTo select fields with their current values, so the selected relationship shows up immediately on create and edit forms instead of a blank field. It works by hydrating the option list and selected label on first render rather than waiting for the async search round-trip. The whole package is essentially one Nova field class you swap in place of the stock field.
How do I install nova-prepopulate-searchable in a Laravel Nova app?
Install it with Composer using genealabs/nova-prepopulate-searchable, then swap the BelongsTo or MorphTo field on the affected Nova resource for the package's field class. There is no service provider surgery, no middleware registration, and no database migration. Effort is roughly a day: one Composer require, one field swap per resource, and one staging smoke test.
Does it support Laravel 10, 11, or 12?
There is no released support for those versions. The last release was 3.0.0 on 2022-02-08 and its changelog contains a single item, Added Laravel 9 compatibility, which places the package's practical ceiling at Laravel 9. Read the declared composer.json constraints rather than assuming, and treat any use on Laravel 10 or newer as unverified until you prove it renders on your stack.
Is genealabs/nova-prepopulate-searchable still maintained?
No. The repository is archived and read-only, so no pull requests are merged, no issues are triaged, and no security patches will be published. Abandonment here is confirmed rather than hypothetical, which means every future Laravel or Nova upgrade becomes your problem with nobody to escalate to.
Which Nova version does this field work with?
It was built against Nova's searchable field API and frontend assets as they existed in the Laravel 9 era, which in practice means Nova 3 and Nova 4. Nova majors released since 2022 changed the field frontend toolchain, and a Nova field is the most version-sensitive surface in the product. Whether it renders correctly against your current Nova major has to be proven empirically, not inferred from the README.
What are the alternatives if I don't want an unmaintained dependency?
You have three realistic options: preload the option list yourself in a small custom Nova field, restrict the relationship field to a narrow query so the current value is always present, or vendor the MIT-licensed code directly into your application. Because the code surface is one small field class, absorbing the pattern is cheap. If your need is only prepopulating from a query string on one or two admin forms, a local field class is usually the lower-risk choice.
What is the production risk of using this on a critical form?
The main risk is a silent one: if the field fails to render against your Nova version, a required relationship can appear blank and users may save empty or incorrect data without noticing. Test with production-shaped data on staging before promoting, and keep the field off critical paths where a missing relation would create bad records. Note also that the package has zero dependents and roughly 37 stars, so there is no ecosystem pressure or community bug reporting to lean on.
How should I test that the field renders correctly before shipping?
Open the edit form for a record with an existing relationship and confirm the selected label appears before you type anything into the search box. Then test the create form with any query-string prefill you rely on, such as a filtered index deep link that preselects a parent record. Watch the browser console for JavaScript errors and re-run the check after any Nova or Laravel upgrade.
Can I fork this package or vendor it into my codebase?
Yes. It is MIT licensed with a very small code surface, which makes the pattern cheap to absorb into your own application or an internal fork. The important step is governance rather than engineering: confirm your policy permits vendoring unmaintained code and name a specific owner for the fork. Without a named owner, an archived dependency tends to quietly rot until the next Nova upgrade forces an emergency fix.
When should I avoid adopting this package entirely?
Skip it if you are on a current Laravel release, if a Nova major upgrade is on the roadmap within the next two quarters, or if you want a platform-level relationship capability across many resources. The package only has meaning inside an application already running Nova, which is a separately licensed product, so it cannot be positioned as shared infrastructure. It fits best as narrow admin-form convenience on a Laravel 9 or 10 codebase staying put on Nova 3 or 4.
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.
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle