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

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

akki-io/laravel-nova-search
===========================

A package that extends search for laravel nova

v2.0.0(1y ago)22558.9k—7.4%11[1 issues](https://github.com/akki-io/laravel-nova-search/issues)MITPHPPHP ^7.3|^8.0CI failing

Since Aug 29Pushed 10mo ago1 watchersCompare

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

READMEChangelog (9)Dependencies (2)Versions (10)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

48

—

FairBetter than 95% of packages

Maintenance49

Moderate activity, may be stable

Popularity47

Moderate usage in the ecosystem

Community17

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 79.5% 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 ~208 days

Recently: every ~360 days

Total

9

Last Release

421d ago

Major Versions

v1.0.7 → v2.0.02025-03-23

PHP version history (2 changes)v1.0PHP ^7.3

v1.0.3PHP ^7.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/e14e68b3ae58f56193332356b226c47e11512dc4520ab60918a9aa1958eff252?d=identicon)[akki-io](/maintainers/akki-io)

---

Top Contributors

[![akki-io](https://avatars.githubusercontent.com/u/34255218?v=4)](https://github.com/akki-io "akki-io (31 commits)")[![jeffreyzant](https://avatars.githubusercontent.com/u/913317?v=4)](https://github.com/jeffreyzant "jeffreyzant (4 commits)")[![marcoboers](https://avatars.githubusercontent.com/u/3316595?v=4)](https://github.com/marcoboers "marcoboers (1 commits)")[![nimah79](https://avatars.githubusercontent.com/u/20343056?v=4)](https://github.com/nimah79 "nimah79 (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

laravelnovaphpsearchakki-iolaravel-nova-search

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[ruflin/elastica

Elasticsearch Client

2.3k50.4M203](/packages/ruflin-elastica)[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)[outl1ne/nova-multiselect-filter

Multiselect filter for Laravel Nova.

45802.7k3](/packages/outl1ne-nova-multiselect-filter)

PHPackages © 2026

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