PHPackages                             khalin/nova4-searchable-belongs-to-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. khalin/nova4-searchable-belongs-to-filter

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

khalin/nova4-searchable-belongs-to-filter
=========================================

Searchable Nova 4 filter for belongsTo relationships.

1.0.1(4y ago)468.4k↓14.5%[2 issues](https://github.com/oleghalin/nova4-searchable-belongs-to-filter/issues)MITVuePHP &gt;=7.1.0

Since Apr 18Pushed 4y agoCompare

[ Source](https://github.com/oleghalin/nova4-searchable-belongs-to-filter)[ Packagist](https://packagist.org/packages/khalin/nova4-searchable-belongs-to-filter)[ RSS](/packages/khalin-nova4-searchable-belongs-to-filter/feed)WikiDiscussions master Synced 1mo ago

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

nova-searchable-belongs-to-filter
=================================

[](#nova-searchable-belongs-to-filter)

Searchable Nova filter for belongsTo relationships.

### Demo

[](#demo)

[![demo](./.github/images/demo.png)](./.github/images/demo.png)

### Prerequisites

[](#prerequisites)

This package assumes you have a text-search setup for your Eloquent models. See [Laravel Scout](https://laravel.com/docs/master/scout).

### Installation

[](#installation)

`composer require khalin/nova4-searchable-belongs-to-filter`

### Usage

[](#usage)

For this example let's assume a user belongs to a department and a department has many users. To make the relationship searchable via a filter, add this to the `filters()` function of your Nova user resource:

By default the filter will display the name of the `fieldAttribute` you passed on instantiation. You can customize the name by passing it as an argument to the filter's construct function, for example `my-new-name`.

```
// app/Nova/User.php

use Khalin\Nova4SearchableBelongsToFilter\NovaSearchableBelongsToFilter

public function filters(Request $request)
{
    return [
	(new NovaSearchableBelongsToFilter('my-new-name'))
	    ->fieldAttribute('department')
	    ->filterBy('department_id')
    ];
}
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.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

1491d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/08aab19f8fb58d29db3e2740da29c3168e41da4d3095fd59ccd2ace71d66be9c?d=identicon)[oleghalin](/maintainers/oleghalin)

---

Top Contributors

[![anotherfrontendguy](https://avatars.githubusercontent.com/u/4764281?v=4)](https://github.com/anotherfrontendguy "anotherfrontendguy (11 commits)")[![thoresuenert](https://avatars.githubusercontent.com/u/382395?v=4)](https://github.com/thoresuenert "thoresuenert (1 commits)")

---

Tags

laravelfilternovanova-4belongs-to

### Embed Badge

![Health badge](/badges/khalin-nova4-searchable-belongs-to-filter/health.svg)

```
[![Health](https://phpackages.com/badges/khalin-nova4-searchable-belongs-to-filter/health.svg)](https://phpackages.com/packages/khalin-nova4-searchable-belongs-to-filter)
```

###  Alternatives

[suenerds/nova-searchable-belongs-to-filter

Searchable Nova filter for belongsTo relationships.

29516.9k](/packages/suenerds-nova-searchable-belongs-to-filter)[outl1ne/nova-multiselect-filter

Multiselect filter for Laravel Nova.

45802.7k3](/packages/outl1ne-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)[digital-creative/nova-mega-filter

Allows you to control the columns and filters shown on your nova resources.

87159.3k](/packages/digital-creative-nova-mega-filter)[optimistdigital/nova-detached-filters

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

64235.5k](/packages/optimistdigital-nova-detached-filters)[outl1ne/nova-input-filter

An input filter for Laravel Nova

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

PHPackages © 2026

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