Download the PHP package mahmudkuet11/nova-multiselect-field without Composer
On this page you can find all versions of the php package mahmudkuet11/nova-multiselect-field. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mahmudkuet11/nova-multiselect-field
More information about mahmudkuet11/nova-multiselect-field
Files in mahmudkuet11/nova-multiselect-field
Package nova-multiselect-field
Short Description A multiple select field for Laravel Nova.
License MIT
Informations about the package nova-multiselect-field
Nova Multiselect
This Laravel Nova package adds a multiselect to Nova's arsenal of fields.
Screenshots
Installation
Install the package in a Laravel Nova project via Composer:
Usage
The field is used similarly to Nova's native Select field. The field type in the database should be text-based (ie string
, text
or varchar
), selected values are stored as a JSON array.
Options
Possible options you can pass to the field using the option name as a function, ie ->placeholder('Choose peanuts')
.
Option | type | default | description |
---|---|---|---|
options |
Array | [] | Options in an array as key-value pairs (['id' => 'value'] ). |
placeholder |
String | Field name | The placeholder string for the input. |
max |
Number | Infinite | The maximum number of options a user can select. |
optionsLimit |
Number | 1000 | The maximum number of options displayed at once. Other options are still accessible through searching. |
resolveForPageResponseUsing |
Callable | null | Only for use in conjunction with Page Manager. Allows you to format the value before it is returned through the API. |
nullable |
Boolean | false | If the field is nullable an empty select will result in null else an empty array ([] ) is stored. |
Credits
License
This project is open-sourced software licensed under the MIT license.