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

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

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

Dependent filter component with support for Laravel Nova 5

v1.1(1y ago)01.8kMITPHPPHP ^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 today

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 69% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity20

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

527d 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

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[vinkius-labs/laravel-page-speed

Laravel Page Speed

2.5k12.5k1](/packages/vinkius-labs-laravel-page-speed)[emargareten/inertia-modal

Inertia Modal is a Laravel package that lets you implement backend-driven modal dialogs for Inertia apps.

90142.9k](/packages/emargareten-inertia-modal)[wearepixel/laravel-cart

A cart implementation for Laravel

1374.8k](/packages/wearepixel-laravel-cart)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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