klepak/nova-multiselect-filter

Multiselect filter for Laravel Nova
183,295 14
Install
composer require klepak/nova-multiselect-filter
Latest Version:v1.2.4
PHP:^7.1|^8.0|^8.1
Laravel:5 – 9
License:MIT
Last Updated:Jun 20, 2024
Links: GitHub  ·  Packagist
Maintainer: knutle

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

Testing

composer test

Related Packages

ampeco/nova-date-range-filter

A Laravel Nova date range filter.

1,069,017 35
optimistdigital/nova-detached-filters

This Laravel Nova package allows you to detach filters from the filter dropdown

246,773 63
silvanite/novafieldcheckboxes

A Laravel Nova field to display a number of multi-select options using checkboxe...

900,975 67
optimistdigital/nova-multiselect-field

A multiple select field for Laravel Nova.

3,838,482 343
outl1ne/nova-multiselect-field

A multiple select field for Laravel Nova.

4,053,566 343

Version History

Version Released PHP Laravel License
v1.2.4 ^7.1|^8.0|^8.1 ^5.8 || ^6.0 || ^7.0 || ^8.0 || ^9.0 MIT
v1.2.3 ^7.1|^8.0 ^5.8 || ^6.0 || ^7.0 || ^8.0 MIT
v1.2.2 ^7.1 ^5.8 || ^6.0 || ^7.0 || ^8.0 MIT
v1.2.1 ^7.1 ^5.8 || ^6.0 || ^7.0 MIT
v1.2 ^7.1 ^5.8 || 6.0 || ^7.0 MIT