PHPackages                             dpsoft/nova-multiselect-filter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Search &amp; Filtering](/categories/search)
4. /
5. dpsoft/nova-multiselect-filter

ActiveLibrary[Search &amp; Filtering](/categories/search)

dpsoft/nova-multiselect-filter
==============================

Multiselect filter and field for Laravel Nova.

v1.2(8mo ago)053MITVue

Since Aug 11Pushed 8mo agoCompare

[ Source](https://github.com/dpsoft-official/nova-select-filter)[ Packagist](https://packagist.org/packages/dpsoft/nova-multiselect-filter)[ RSS](/packages/dpsoft-nova-multiselect-filter/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

Nova Multiselect Filter &amp; Field with ajax
=============================================

[](#nova-multiselect-filter--field-with-ajax)

[![Latest Version on Packagist](https://camo.githubusercontent.com/7e8bd0428b2086e679b3ab03f90619a909c51225f897f06b07ba6ea37334dcce/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6470736f66742f6e6f76612d6d756c746973656c6563742d66696c7465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dpsoft/nova-multiselect-filter)[![Total Downloads](https://camo.githubusercontent.com/9e61937de6b9ff172aed27194f648dcac904901a2bf255cbc452fbb641898d93/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6470736f66742f6e6f76612d6d756c746973656c6563742d66696c7465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dpsoft/nova-multiselect-filter)

This [Laravel Nova](https://nova.laravel.com) package adds a multiselect to Nova's filters and form fields.

Requirements
------------

[](#requirements)

- `laravel/nova: ^3.0`

Features
--------

[](#features)

- Multi select
- Single select
- Group select
- Search
- Filter and Field

Installation
------------

[](#installation)

Install the package in a Laravel Nova project via Composer:

```
composer require dpsoft/nova-multiselect-filter
```

Usage
-----

[](#usage)

### As a Filter

[](#as-a-filter)

The filter can be used when switching `Filter` class with `MultiselectFilter`.

```
use Dpsoft\NovaMultiselectFilter\MultiselectFilter;

class BooksByAuthorFilter extends MultiselectFilter
{
    public function apply(Request $request, $query, $value)
    {
        return $query->whereHas('books', function ($query) use ($value) {
            $query->whereIn('author_id', $value);
        });
    }

    public function options(Request $request)
    {
        return Authors::all()->pluck('name', 'id');
    }
}
```

### As a Form Field

[](#as-a-form-field)

The field can be used in Nova resources for form input:

```
use Dpsoft\NovaMultiselectFilter\MultiselectField;

public function fields(Request $request)
{
    return [
        MultiselectField::make('Categories')
            ->options([
                'tech' => 'Technology',
                'business' => 'Business',
                'science' => 'Science'
            ])
            ->placeholder('Select categories'),

        MultiselectField::make('Tags')
            ->options(Tag::all()->pluck('name', 'id'))
            ->singleSelect() // For single selection
            ->max(3), // Maximum 3 selections
    ];
}
```

### Built-in server-side search endpoint

[](#built-in-server-side-search-endpoint)

```
use Dpsoft\NovaMultiselectFilter\MultiselectFilter;

class UsersByRoleFilter extends MultiselectFilter
{
    public function __construct()
    {
        $this->model(\App\Models\Role::class)
             ->searchColumn('name')
             ->minChars(2)
             ->debounce(300);
    }

    public function apply(Request $request, $query, $value)
    {
        return $query->whereIn('role_id', $value);
    }
}
```

### Option groups

[](#option-groups)

Option groups are supported. Their syntax is the same as [Laravel's option group syntax](https://nova.laravel.com/docs/2.0/resources/fields.html#select-field).

In this example (from Nova docs), all values are grouped by the `group` key:

```
    public function options(Request $request)
    {
        return [
          'cat' => ['label' => 'Cat', 'group' => 'Pets'],
          'dog' => ['label' => 'Dog', 'group' => 'Pets'],
          'eagle' => ['label' => 'Eagle', 'group' => 'Birds'],
          'parrot' => ['label' => 'Parrot', 'group' => 'Birds'],
        ]
    }
```

Options
-------

[](#options)

Possible options you can pass to the filter using the option name as a function, ie `->placeholder('Choose peanuts')`.

Optiontypedefaultdescription`options`Array|callable\[\]Options in an array as key-value pairs (`['id' => 'value']`).`placeholder`StringField nameThe placeholder string for the input.`max`NumberInfiniteThe maximum number of options a user can select.`groupSelect`BooleanfalseFor use with option groups - allows the user to select whole groups at once`singleSelect`BooleanfalseMakes the field act as a single select which also means the saved value will not be an array.`optionsLimit`Number1000The maximum number of options displayed at once. Other options are still accessible through searching.`ajaxEndpoint`StringnullCustom endpoint to search and return options for async search. Defaults to `/nova-vendor/nova-multiselect-filter/search`.`ajaxMethod`StringgetRequest method for async search.`ajaxParam`StringsearchQuery param name for the search term.`debounce`Number300Debounce in milliseconds for async search.`minChars`Number0Minimum characters before search triggers.`model`StringnullFully qualified model class name used by the built-in search endpoint.`searchColumn`StringnullColumn name used by the built-in search endpoint.`limit`NumbernullThe number of options to return from a server-side search.Credits
-------

[](#credits)

- [Dpsoft](https://github.com/dpsoft-official)
- [Kaspar Rosin](https://github.com/kasparrosin)
- [Tarvo Reinpalu](https://github.com/Tarpsvo)
- [shentao/vue-multiselect](https://github.com/shentao/vue-multiselect)
- [All Contributors](https://github.com/dpsoft/nova-multiselect-filter/graphs/contributors)

This package was inspired by [klepak/nova-multiselect-filter](https://github.com/klepak/nova-multiselect-filter)

License
-------

[](#license)

This project is open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance60

Regular maintenance activity

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~13 days

Total

3

Last Release

251d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d8ce9db5e47c9f42b80ea1102230d26603ed743596b579011934e7b67b37811d?d=identicon)[dpsoft-ir](/maintainers/dpsoft-ir)

---

Top Contributors

[![SadeghPM](https://avatars.githubusercontent.com/u/9298600?v=4)](https://github.com/SadeghPM "SadeghPM (7 commits)")

---

Tags

laravelfilterselectmultiselectnovalaravel-nova

### Embed Badge

![Health badge](/badges/dpsoft-nova-multiselect-filter/health.svg)

```
[![Health](https://phpackages.com/badges/dpsoft-nova-multiselect-filter/health.svg)](https://phpackages.com/packages/dpsoft-nova-multiselect-filter)
```

###  Alternatives

[outl1ne/nova-multiselect-filter

Multiselect filter for Laravel Nova.

45802.7k3](/packages/outl1ne-nova-multiselect-filter)[optimistdigital/nova-multiselect-filter

Multiselect filter for Laravel Nova.

45305.4k](/packages/optimistdigital-nova-multiselect-filter)[outl1ne/nova-input-filter

An input filter for Laravel Nova

24822.7k](/packages/outl1ne-nova-input-filter)[optimistdigital/nova-input-filter

An input filter for Laravel Nova

24550.6k2](/packages/optimistdigital-nova-input-filter)[klepak/nova-multiselect-filter

Multiselect filter for Laravel Nova

14179.4k2](/packages/klepak-nova-multiselect-filter)[outl1ne/nova-detached-filters

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

64343.5k](/packages/outl1ne-nova-detached-filters)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
