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 Multiselect Field

Nova Multiselect Field Laravel Package

outl1ne/nova-multiselect-field

Laravel Nova multiselect field with searchable multi- and single-select, async resource querying, drag-and-drop reordering, option dependencies, distinct value groups, and on-the-fly tagging. Stores values as JSON and supports light and dark modes.

View on GitHub
Deep Wiki
Context7

Nova Multiselect is a Laravel Nova package that adds a searchable multiselect field to Nova’s field arsenal. It supports multi- and single-select modes, async searching, drag-and-drop reordering, and stores selected values as a stringified JSON array—or as JSON with saveAsJSON().

  • Searchable options with multi/single select and asynchronous model querying
  • Drag-and-drop reordering plus maximum selection limits
  • Dependencies and distinct groups across multiple multiselect instances
  • Taggable values and full light/dark mode compatibility
Frequently asked questions about Nova Multiselect Field
How do I install the Nova multiselect field?
Install it with Composer using composer require outl1ne/nova-multiselect-field. The package requires PHP ^8.1 and laravel/nova ^5.0. No package migrations are needed for the default text-column mode, and you add one Multiselect::make() line per field in your Nova resource.
What database column type does this multiselect field need?
By default the field stores selected values as a stringified JSON array in a text-based column such as string, text, or varchar. If your column is a real JSON type, call saveAsJSON() so the value is persisted as JSON instead. The storage choice affects model casts, API serialization, filters, and reporting, so decide on a convention before using the field widely.
How do I use async resource searching with the multiselect field?
Use asyncResource(Artist::class) to query a Nova resource asynchronously, or point the field at a custom endpoint with api('/your-endpoint'). The async search endpoint must inherit authorization correctly from your Nova resource policies. If a resource is misconfigured, the search endpoint can expose model data, so verify policies before shipping.
Does this package support searchable single-select fields in Nova?
Yes. Add singleSelect() to a Multiselect field to get a searchable single-select field. It uses the same option, async, dependency, and taggable features as the multi-select mode. This is useful when you want Nova's Select behavior with search and async querying.
How do I make one multiselect field depend on another or prevent duplicate selections?
Use optionsDependOn to make a field's options depend on another field, and distinct('group') to disable values already used by other multiselects in the same group. These front-end behaviors are UX affordances, not enforcement mechanisms. Validate dependent and distinct values server-side in your form request or model rules.
Can users reorder selected values with drag and drop?
Yes, add reorderable() to enable drag-and-drop reordering of selected values. You can also control how many options display at once with optionsLimit() and limit selections with max(). The saved order follows the array stored in the column, so account for it in any downstream rendering.
Is taggable() safe for user-entered values, and how should I validate them?
taggable() lets users add free-text tags on the fly, which means arbitrary strings can enter the column. The package does not document built-in validation for those values. Add explicit server-side validation rules such as allowed characters, maximum length, and an allowlist or normalization step before relying on the data.
Which Laravel Nova versions are supported, and is there upgrade risk?
The current release requires laravel/nova ^5.0 and PHP ^8.1, with parallel branches for Nova 4 and Nova 3. The package reaches into Nova internals, and v4.4.0 raised the minimum Nova 4 version to 4.27 because of an inner method visibility change. Pin Nova versions and test this field during every Nova upgrade.
How do I store selections as JSON or use a pivot table instead of a text column?
Call saveAsJSON() when the database column is a real JSON type. For relational data, the package also provides belongsToMany and belongsTo modes that use pivot tables instead of a text column. Choose between controlled vocabulary and open tag list per field, and document that storage convention.
What are the alternatives to this package, and is it actively maintained?
Alternatives include Nova's native Select field for simple static option lists and BelongsToMany for relational data, while this package fits multi-value attributes needing search, async sources, dependencies, or tagging. Maintenance comes from a small team, effectively one primary author, with no commercial SLA. If admin availability is critical, consider an internal fork or mirror policy and pin the package version.
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.
andydefer/laravel-notification
adachsoft/cli-process-tester
jhaskell13/laraflow
sebastienheyd/boilerplate-media-manager
ccast/tagixo-primix
pretendtrue/laravel-builder
sawmainek/laravel-scout-tntsearch-driver
tomshaw/laravel-calendar-table
dibakar/laravel-ownership
steadrun/laravel-monitor
labyrinthe/connect-laravel
elmogy/layan
drewdan/sentinel-client
dskripchenko/laravel-llm
fatryst/nuonuo
stevenay/myanfont
gmostafa/php-graphql-client
xeviant/paystack
snowsoft/faker
meditationsteps/blogetc