Download the PHP package outl1ne/nova-multiselect-filter without Composer
On this page you can find all versions of the php package outl1ne/nova-multiselect-filter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download outl1ne/nova-multiselect-filter
More information about outl1ne/nova-multiselect-filter
Files in outl1ne/nova-multiselect-filter
Package nova-multiselect-filter
Short Description Multiselect filter for Laravel Nova.
License MIT
Informations about the package nova-multiselect-filter
Nova Multiselect Filter
This Laravel Nova package adds a multiselect to Nova's filters.
Requirements
php: >=7.2
laravel/nova: ^4.0
Features
- Multi select
- Single select
- Group select
- Search
Screenshots
Multiselect
Groupselect
Installation
Install the package in a Laravel Nova project via Composer:
Usage
The filter can be used when switching Filter
class with MultiselectFilter
.
Option groups
Option groups are supported. Their syntax is the same as Laravel's option group syntax.
In this example (from Nova docs), all values are grouped by the group
key:
Options
Possible options you can pass to the filter using the option name as a function, ie ->placeholder('Choose peanuts')
.
Option | type | default | description |
---|---|---|---|
options |
Array|callable | [] | 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. |
groupSelect |
Boolean | false | For use with option groups - allows the user to select whole groups at once |
singleSelect |
Boolean | false | Makes the field act as a single select. The returned value will be an array with one element. |
optionsLimit |
Number | 1000 | The maximum number of options displayed at once. Other options are still accessible through searching. |
Localization
The translations file can be published by using the following publish command:
You can then edit the strings to your liking.
Credits
This package was inspired by klepak/nova-multiselect-filter
License
This project is open-sourced software licensed under the MIT license.
All versions of nova-multiselect-filter with dependencies
laravel/nova Version ^4.0
outl1ne/nova-translations-loader Version ^5.0.0