Skip to content

Provides capability of selecting multiple values with Nova Resource filter. Translatable and Count Problem Fixed.

Notifications You must be signed in to change notification settings

kdrmlhcn/nova-multiselect-label-filter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

composer require kdrmlhcn/nova-multiselect-label-filter

Description

Multiselect label filter for Laravel Nova. Based on vue-multiselect

example

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

About

Provides capability of selecting multiple values with Nova Resource filter. Translatable and Count Problem Fixed.

Resources

Stars

Watchers

Forks

Packages

No packages published