PHPackages                             juniora/laravel-nova-search - 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. juniora/laravel-nova-search

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

juniora/laravel-nova-search
===========================

A package that extends search for laravel nova

v2.0.0(1y ago)01.4k↓66.7%MITPHPPHP ^7.3|^8.0

Since Dec 21Pushed 1y agoCompare

[ Source](https://github.com/JunioraTeam/laravel-nova-search)[ Packagist](https://packagist.org/packages/juniora/laravel-nova-search)[ Docs](https://github.com/akki-io/laravel-nova-search)[ RSS](/packages/juniora-laravel-nova-search/feed)WikiDiscussions master Synced 1mo ago

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

 [![Hero](https://raw.githubusercontent.com/akki-io/laravel-nova-search/master/hero.png)](https://raw.githubusercontent.com/akki-io/laravel-nova-search/master/hero.png)

Laravel Nova Search
===================

[](#laravel-nova-search)

[![Latest Version](https://camo.githubusercontent.com/b3ed7ad6e0ac1faf81fe6b9aca283c7c8da09ce6df47928998f7a6f5e4c60c4a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f616b6b692d696f2f6c61726176656c2d6e6f76612d7365617263682e7376673f7374796c653d666c61742d737175617265)](https://github.com/akki-io/laravel-nova-search/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![StyleCI](https://camo.githubusercontent.com/c5802a94fd8c707a7828ef3463ace352a2c42a5ff4c8413ed931eb39a722786d/68747470733a2f2f7374796c6563692e696f2f7265706f732f3239313230393531332f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/291209513)[![Total Downloads](https://camo.githubusercontent.com/683d096754a7a02432c9e40b0f898fc532378187e2c15cbbfb662c651ba02c89/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616b6b692d696f2f6c61726176656c2d6e6f76612d7365617263682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/akki-io/laravel-nova-search)

### Testing Statuses

[](#testing-statuses)

MySQL - [![GitHub Workflow Status (branch)](https://camo.githubusercontent.com/08807478d691f4b7bd0885a78dab8e70a2d6f5bc7d5e2edc43dbafe9f7cecf77/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f616b6b692d696f2f6c61726176656c2d6e6f76612d7365617263682f746573742d6d7973716c2e796d6c3f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/08807478d691f4b7bd0885a78dab8e70a2d6f5bc7d5e2edc43dbafe9f7cecf77/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f616b6b692d696f2f6c61726176656c2d6e6f76612d7365617263682f746573742d6d7973716c2e796d6c3f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)

SQLite - [![GitHub Workflow Status (branch)](https://camo.githubusercontent.com/6f475d225818a98dc5975b4f71083a58f20f2d7eba3df5d50c523c90a52df1f5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f616b6b692d696f2f6c61726176656c2d6e6f76612d7365617263682f746573742d73716c6974652e796d6c3f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/6f475d225818a98dc5975b4f71083a58f20f2d7eba3df5d50c523c90a52df1f5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f616b6b692d696f2f6c61726176656c2d6e6f76612d7365617263682f746573742d73716c6974652e796d6c3f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)

pgSQL - [![GitHub Workflow Status (branch)](https://camo.githubusercontent.com/330011f48b609667851f00a10f3092537f2f0116975c431139ed2ed8b2966bd5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f616b6b692d696f2f6c61726176656c2d6e6f76612d7365617263682f746573742d706773716c2e796d6c3f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/330011f48b609667851f00a10f3092537f2f0116975c431139ed2ed8b2966bd5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f616b6b692d696f2f6c61726176656c2d6e6f76612d7365617263682f746573742d706773716c2e796d6c3f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)

This package provides a trait that extends the search behaviour of laravel nova resource.

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

[](#installation)

You can install the package via composer:

```
composer require akki-io/laravel-nova-search
```

Next, add `AkkiIo\LaravelNovaSearch\LaravelNovaSearchable` trait to your base resource `App\Nova\Resource` class.

```
use AkkiIo\LaravelNovaSearch\LaravelNovaSearchable;

abstract class Resource extends NovaResource
{
    use LaravelNovaSearchable;

    // ...
}
```

Usage
-----

[](#usage)

This package DOES NOT have fuzzy matching capabilities. If you are looking for robust fuzzy matching capabilities provided by "real" search engines, you should look into [Laravel Scout](https://laravel.com/docs/scout).

This package adds the following types of search to your laravel nova resource.

- Search multiple columns using concatenation.
- Search every word in columns.
- Search relationship columns.

### Search multiple columns using concatenation.

[](#search-multiple-columns-using-concatenation)

To define which resource fields are searchable, you may assign a two-dimensional array of database columns in the `public static $searchConcatenation` property of your resource class. Each array in the array are names of columns that are concatenated using whitespace.

```
/**
 * The columns that should be concatenated and searched.
 *
 * @var array
 */
 public static $searchConcatenation = [
    ['first_name', 'last_name'],
    ['first_name', 'company'],
 ];
```

### Search every word in columns.

[](#search-every-word-in-columns)

To define which resource fields are searchable, you may assign an array of database columns in the `public static $searchMatchingAny` property of your resource class. Every word in your input is searched for across all these columns.

```
/**
 * The columns that should be searched for any matching entry.
 *
 * @var array
 */
 public static $searchMatchingAny = [
    'first_name',
    'last_name',
    'email',
 ];
```

### Search relationship columns.

[](#search-relationship-columns)

To define which resource fields are searchable, you may assign an array of database columns in the `public static $searchRelations` property of your resource class. These database columns are from the related table that is used for searching. This array has a relationship name as a key, and an array of columns to search for as a value.

```
/**
 * The relationship columns that should be searched.
 *
 * @var array
 */
 public static $searchRelations = [
     'posts' => ['title', 'sub_title'],
 ];
```

#### Nested relationships

[](#nested-relationships)

You may search nested relationships using dot notation.

```
/**
 * The relationship columns that should be searched.
 *
 * @var array
 */
public static $searchRelations = [
    'user.location' => ['state_abbr', 'country_abbr'],
];
```

#### Search multiple columns in relationship using concatenation.

[](#search-multiple-columns-in-relationship-using-concatenation)

To define which resource fields are searchable, you may assign a two-dimensional array of database columns in the `public static $searchRelationsConcatenation` property of your resource class. Each array in the array are names of columns that are concatenated using whitespace.

```
/**
 * The relationship columns that should to be concatenated and searched.
 *
 * @var array
 */
 public static $searchRelationsConcatenation = [
    'user' => [
        ['first_name', 'last_name'],
        ['email']
    ],
 ];
```

#### Search every word in columns of a relationship.

[](#search-every-word-in-columns-of-a-relationship)

To define which resource fields are searchable, you may assign an array of database columns in the `public static $searchRelationsMatchingAny` property of your resource class. Every word in your input is searched for across all these columns.

```
/**
 * The relationship columns that should be searched for any matching entry.
 *
 * @var array
 */
 public static $searchRelationsMatchingAny = [
    'user' => ['first_name', 'last_name'],
 ];
```

### Testing

[](#testing)

```
composer test
```

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Akki Khare](https://github.com/akki-io)
- [Nova Search Relationship Package](https://github.com/TitasGailius/nova-search-relations)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance40

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 76.9% 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

Unknown

Total

1

Last Release

514d ago

### Community

Maintainers

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

---

Top Contributors

[![akki-io](https://avatars.githubusercontent.com/u/34255218?v=4)](https://github.com/akki-io "akki-io (30 commits)")[![jeffreyzant](https://avatars.githubusercontent.com/u/913317?v=4)](https://github.com/jeffreyzant "jeffreyzant (3 commits)")[![nimah79](https://avatars.githubusercontent.com/u/20343056?v=4)](https://github.com/nimah79 "nimah79 (3 commits)")[![marcoboers](https://avatars.githubusercontent.com/u/3316595?v=4)](https://github.com/marcoboers "marcoboers (1 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (1 commits)")[![zupolgec](https://avatars.githubusercontent.com/u/161318?v=4)](https://github.com/zupolgec "zupolgec (1 commits)")

---

Tags

akki-iolaravel-nova-search

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/juniora-laravel-nova-search/health.svg)

```
[![Health](https://phpackages.com/badges/juniora-laravel-nova-search/health.svg)](https://phpackages.com/packages/juniora-laravel-nova-search)
```

###  Alternatives

[ruflin/elastica

Elasticsearch Client

2.3k50.4M203](/packages/ruflin-elastica)[akki-io/laravel-nova-search

A package that extends search for laravel nova

22558.9k](/packages/akki-io-laravel-nova-search)[opensearch-project/opensearch-php

PHP Client for OpenSearch

15224.3M65](/packages/opensearch-project-opensearch-php)[mailerlite/laravel-elasticsearch

An easy way to use the official PHP ElasticSearch client in your Laravel applications.

934529.3k2](/packages/mailerlite-laravel-elasticsearch)[massive/search-bundle

Massive Search Bundle

721.4M13](/packages/massive-search-bundle)[shyim/opensearch-php-dsl

OpenSearch/Elasticsearch DSL library

175.9M9](/packages/shyim-opensearch-php-dsl)

PHPackages © 2026

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