Skip to content

pos-lifestyle/laravel-nova-multiselect-filter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

composer require klepak/nova-multiselect-filter

Description

Multiselect filter for Laravel Nova. Based on vue-multiselect

example

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',
        ];
    }
}

About

Multiselect filter for Laravel Nova

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Vue 58.0%
  • PHP 37.6%
  • JavaScript 4.4%