arku/nova-multiselect
arku/nova-multiselect is a Laravel Nova field that adds a searchable multi-select input for resource forms, letting users choose and manage multiple options with tag-style entry and flexible value handling.
arku/nova-multiselect is a Nova form field that swaps the stock single-value select for a searchable, tag-style multi-select UI (the vue-multiselect pattern). Install it as a normal Nova tool dependency:
composer require arku/nova-multiselect
php artisan nova:publish # or the package's own --tag=assets, check README
php artisan view:clear
There is no config file and normally no manual service-provider registration — Nova's package discovery picks it up. Before relying on the docs, open vendor/arku/nova-multiselect/src/ once: the class name and namespace are the single source of truth (Arku\NovaMultiSelect\...) and the README on the repo is thin.
Your first meaningful use case is a "tags"-style column: a model attribute that holds an array (JSON cast) rather than a foreign key. Add the field to a resource:
use Arku\NovaMultiSelect\MultiSelect;
MultiSelect::make('Tags')
->options([
'laravel' => 'Laravel',
'vue' => 'Vue',
'testing' => 'Testing',
]),
Confirm it round-trips on create, update, and detail before wiring anything else — the value is persisted as an array, so the column cast matters (see Gotchas).
Static option lists. Pass ->options([...]) for a fixed vocabulary. This is the common case for statuses, categories, or feature flags — keep the array in a config file or a model constant so index filters and validation can reuse the same keys.
Async / searchable options. For long lists (customers, SKUs) use the field's searchable mode against a Nova resource or API endpoint rather than inlining thousands of options. Return [{ value, label }] shaped payloads; check the source for the exact method name (->searchable(), ->options(...) closure, or ->apiUrl(...) depending on your version).
Relationship-backed selection. For belongsToMany the native BelongsToMany field is often a better fit, but this field works when you want a single array-shaped attribute rather than pivot rows. If you go relational, keep ->relationship('categories', 'name') and remember Nova handles syncing via saveAs/sync, so don't also mutate the array in a saving observer.
Validation. Always validate as an array, never a string:
MultiSelect::make('Tags')
->options($this->tagOptions())
->rules('nullable', 'array')
->rules('items.*', 'in:laravel,vue,testing'),
Display and filtering. Multi-selects render poorly as raw JSON on index. Use ->displayUsing(fn ($value) => collect($value)->map(...)->join(', ')) or ->hideFromIndex() and surface the values in a badge column or a Filter instead. Detail views are fine out of the box.
Actions and inline creation. The field works inside Nova Action modals and Resource::inline() blocks; the only requirement is that the underlying column accepts null/array on partial updates.
composer.json require block against your Nova version before installing, and treat the native Nova\Fields\Multiselect (present since Nova 2) as the default choice unless you specifically need this package's search UI.'tags' => 'array' or 'json' on the model), Nova will submit an array and Eloquent will throw on save, or you'll store ["a","b"] as a string. Migrate to json on MySQL/Postgres, text plus cast elsewhere.[] or null depending on the field's config. Handle both in validation (nullable|array) and in display closures to avoid "foreach on null" in your index.composer update, re-run nova:publish and hard-refresh; stale public/vendor/nova-multiselect bundles are the usual cause of "nothing changed after I edited options."Select filters, an array column won't slot into Filter::make(...)->options(). Write a custom filter or use whereJsonContains.{value,label} objects instead of scalars usually means a version mismatch between the field's JS and its PHP serialization.resolve/fill plus republishing the Vue component. That's acceptable for one project, expensive to maintain across apps — another reason to prefer the built-in field on greenfield work.How can I help you explore Laravel packages today?