kdrmlhcn / nova-multiselect-label-filter
Multiselect filter for Laravel Nova
Installs: 730
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 0
Open Issues: 1
Language:Vue
Requires
- php: ^7.1
- laravel/framework: ^5.8 || ^6.0 || ^7.0
- laravel/nova: ^2.0 || ^3.0
This package is not auto-updated.
Last update: 2024-12-20 09:29:00 UTC
README
composer require kdrmlhcn/nova-multiselect-label-filter
Description
Multiselect label filter for Laravel Nova. Based on vue-multiselect
Usage
use Illuminate\Http\Request; use Kdrmlhcn\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', ]; } }