PHPackages                             okol/dependent-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. okol/dependent-filter

ActiveLibrary

okol/dependent-filter
=====================

Dependent filter component with support for Laravel Nova 5

v1.1(1y ago)0822MITPHPPHP ^8.1

Since Jan 23Pushed 1y ago1 watchersCompare

[ Source](https://github.com/oleksandrkolomiiets/laravel-nova-dependent-filter)[ Packagist](https://packagist.org/packages/okol/dependent-filter)[ RSS](/packages/okol-dependent-filter/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

***Examples***

**Type**

```
class TypeFilter extends DependentFilter
{
    public $component = 'dependent-filter';

    public $attribute = 'type';

    public $name = 'Type';

    public function options(Request $request, array $filters = []): array
    {
        return collect(TypeEnum::cases())->mapWithKeys(function ($case) {
            return [$case->value => $case->name()];
        })->toArray();
    }
}

```

**Category (Dependent of Type)**

```
class CategoryFilter extends DependentFilter
{
    public $component = 'dependent-filter';

    public $attribute = 'category_id';

    public $dependentOf = ['type'];

    public $name = 'Category';

    public function options(Request $request, array $filters = []): array
    {
        if (! empty($filters['type'])) {
            return Category::query()
                ->where('type', $filters['type'])
                ->whereNull('parent_id')
                ->pluck('title', 'id')
                ->toArray();
        }

        return [];
    }
}

```

**SubCategory (Dependent of Category)**

```
class SubCategoryFilter extends DependentFilter
{
    public $component = 'dependent-filter';

    public $attribute = 'sub_category_id';

    public $dependentOf = ['category_id'];

    public $name = 'Sub Category';

    public function options(Request $request, array $filters = []): array
    {
        if (! empty($filters['category_id'])) {
            return Category::query()
                ->where('parent_id', $filters['category_id'])
                ->pluck('title', 'id')
                ->toArray();
        }

        return [];
    }
}

```

***Usage***

```
public function filters(NovaRequest $request): array
{
    return [
        new TypeFilter,
        new CategoryFilter,
        new SubCategoryFilter,
    ];
}

```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance42

Moderate activity, may be stable

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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 ~0 days

Total

2

Last Release

480d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/79951f797abe5b30b5a253056a64b42695255f67bbd4654d30f225cef57816d2?d=identicon)[oleksandr.kolomiiets.pro@gmail.com](/maintainers/oleksandr.kolomiiets.pro@gmail.com)

---

Top Contributors

[![o-kolomiiets](https://avatars.githubusercontent.com/u/161366719?v=4)](https://github.com/o-kolomiiets "o-kolomiiets (2 commits)")[![oleksandrkolomiiets](https://avatars.githubusercontent.com/u/61982431?v=4)](https://github.com/oleksandrkolomiiets "oleksandrkolomiiets (1 commits)")

---

Tags

laravelnova

### Embed Badge

![Health badge](/badges/okol-dependent-filter/health.svg)

```
[![Health](https://phpackages.com/badges/okol-dependent-filter/health.svg)](https://phpackages.com/packages/okol-dependent-filter)
```

###  Alternatives

[laravel-lang/publisher

Localization publisher for your Laravel application

2167.7M24](/packages/laravel-lang-publisher)[laravel/nova-log-viewer

A Laravel Nova tool for viewing your application logs.

136301.3k1](/packages/laravel-nova-log-viewer)[genealabs/laravel-changelog

A Laravel Nova tool.

55250.7k](/packages/genealabs-laravel-changelog)[genealabs/laravel-overridable-model

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

92398.0k2](/packages/genealabs-laravel-overridable-model)[dniccum/nova-documentation

A Laravel Nova tool that allows you to add markdown-based documentation to your administrator's dashboard.

37116.4k](/packages/dniccum-nova-documentation)[datomatic/nova-enum-field

A Laravel Nova PHP 8.1 enum field with filters

20134.2k](/packages/datomatic-nova-enum-field)

PHPackages © 2026

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