PHPackages                             gekich/nested-tree-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. gekich/nested-tree-filter

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

gekich/nested-tree-filter
=========================

A Laravel Nova nested tree filter.

1.0.0(4y ago)62.4k2[1 issues](https://github.com/gekich/nova-nested-tree-filter/issues)MITPHPPHP ^7.3|^8.0

Since Jun 23Pushed 4y ago2 watchersCompare

[ Source](https://github.com/gekich/nova-nested-tree-filter)[ Packagist](https://packagist.org/packages/gekich/nested-tree-filter)[ RSS](/packages/gekich-nested-tree-filter/feed)WikiDiscussions master Synced 1w ago

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

Laravel Nova Nested Tree Filter
===============================

[](#laravel-nova-nested-tree-filter)

custom nested tree filter for laravel nova.

[![Example usage](https://camo.githubusercontent.com/a477a40decf97fb989523ff681ae58875ceb4a405d385325040fbc84bf77a7cb/68747470733a2f2f692e696d6775722e636f6d2f335230636671552e706e67)](https://camo.githubusercontent.com/a477a40decf97fb989523ff681ae58875ceb4a405d385325040fbc84bf77a7cb/68747470733a2f2f692e696d6775722e636f6d2f335230636671552e706e67)

> This filter uses tree provided by kalnoy/nestedset package

> This filter uses riophae/vue-treeselect under the hood

Install
-------

[](#install)

Let's assume you need to filter `Product`s that are related to nested `Category` model

First of all, require using `gekich/nested-tree-filter`

```
composer require gekich/nested-tree-filter

```

Create new filter using, nova:filter, for example:

```
php artisan nova:filter CategoryFilter

```

Make your newly created class extend `Gekich\NestedTreeFilter\NestedTreeFilter`:

```
use Gekich\NestedTreeFilter\NestedTreeFilter;

class CategoryFilter extends NestedTreeFilter
{
//
}
```

Remove all code from newly created class CategoryFilter, and setup:

```
class CategoryFilter extends NestedTreeFilter
{
    public $filterModel = \App\Category::class; // - nested tree model
    public $filterRelation = 'categories'; // - relation that filter uses
    public $name = 'Categories filter'; // - filter name
    public $idKey = 'id'; // - id column
    public $labelKey = 'name'; // - label column name
}
```

Also there are placeholder option

```
    public $placeholder = 'Select...';
```

And multiple select option

```
    public $multiple = true;
```

Usage
-----

[](#usage)

Include the filter you created during instalation in Laravel nova `Product` resource:

```
use App\Nova\Filters\CategoryFilter;

class Product extends Resource
{
..
    public function filters(Request $request)
    {
        return [
            CategoryFilter::make()
        ];
    }
```

Filter is ready to use. You can apply this filter to filter to resource relation that set in `$filterRelation`

Contributing
------------

[](#contributing)

Feel free to suggest changes, ask for new features or fix bugs yourself.

Hope this package will be usefull for you.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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 ~513 days

Total

2

Last Release

1642d ago

Major Versions

0.1 → 1.0.02021-11-18

PHP version history (2 changes)0.1PHP &gt;=7.1.0

1.0.0PHP ^7.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/cc0e1f17d1f30d3a8d8e0dbb526f8c350158c6ac7269caf37c68c870e30318fe?d=identicon)[gekich](/maintainers/gekich)

---

Top Contributors

[![gekich](https://avatars.githubusercontent.com/u/26979462?v=4)](https://github.com/gekich "gekich (2 commits)")

---

Tags

filterlaravellaravel-novanested-treenovaphptreeselectlaravelnova

### Embed Badge

![Health badge](/badges/gekich-nested-tree-filter/health.svg)

```
[![Health](https://phpackages.com/badges/gekich-nested-tree-filter/health.svg)](https://phpackages.com/packages/gekich-nested-tree-filter)
```

###  Alternatives

[optimistdigital/nova-multiselect-field

A multiple select field for Laravel Nova.

3403.5M7](/packages/optimistdigital-nova-multiselect-field)[digital-creative/conditional-container

Provides an easy way to conditionally show and hide fields in your Nova resources.

116593.8k4](/packages/digital-creative-conditional-container)[genealabs/laravel-overridable-model

Provide a uniform method of allowing models to be overridden in Laravel.

92398.0k2](/packages/genealabs-laravel-overridable-model)[phoenix-lib/nova-nested-tree-attach-many

Nova vue-tree-select field for management nested category relations.

3587.4k](/packages/phoenix-lib-nova-nested-tree-attach-many)[inspheric/nova-defaultable

Default values for Nova fields when creating resources and running resource actions.

51174.8k1](/packages/inspheric-nova-defaultable)[murdercode/nova4-tinymce-editor

Boost your Laravel Nova with the TinyMCE editor.

17165.2k](/packages/murdercode-nova4-tinymce-editor)

PHPackages © 2026

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