klepak / nova-multiselect-filter
Multiselect filter for Laravel Nova
Installs: 167 400
Dependents: 1
Suggesters: 0
Security: 0
Stars: 14
Watchers: 5
Forks: 18
Open Issues: 7
Requires
- php: ^7.1|^8.0|^8.1
- laravel/framework: ^5.8 || ^6.0 || ^7.0 || ^8.0 || ^9.0
- laravel/nova: ^2.0 || ^3.0
Requires (Dev)
- orchestra/testbench: ^4.0|^5.0|^7.0
- phpunit/phpunit: ^8.0|^9.0
README
composer require klepak/nova-multiselect-filter
Description
Multiselect filter for Laravel Nova. Based on vue-multiselect
Usage
use Illuminate\Http\Request; use Klepak\NovaMultiselectFilter\NovaMultiselectFilter; class CustomFilter extends NovaMultiselectFilter { public function apply(Request $request, $query, $value) { return $query->whereIn('field', $value); } public function options(Request $request) { return [ 'Label 1' => 'value-1', 'Label 2' => 'value-2', 'Label 3' => 'value-3', ]; } }
Testing
composer test