PHPackages                             shepp/nova-concat-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. shepp/nova-concat-search

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

shepp/nova-concat-search
========================

Search by Concatenated fields in Laravel Nova

v1.0.0(3y ago)00GPL-3.0-onlyPHPPHP ^8.0

Since Sep 27Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Luke-Shepp/nova-search-concat)[ Packagist](https://packagist.org/packages/shepp/nova-concat-search)[ RSS](/packages/shepp-nova-concat-search/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Laravel Nova Concat Search
--------------------------

[](#laravel-nova-concat-search)

Allows searching for Resources by a concatenation of multiple fields in Laravel Nova.

### Example

[](#example)

An example use case is where a table contains `first_name` and `last_name`, and the Nova user would like to search by full name.

Example table;

first\_namelast\_nameemail...JohnDoe...Using standard Nova search, the term `John Doe` will not match this record as neither first name or last name match.

By adding a sub-array of column names into the `$search` property of a Resource, this package allows searching on concatenated database fields:

```
class User extends Resource
{
    use Shepp\NovaConcatSearch\Traits\SearchesOnConcatColumns;

    public static $search = [
        ['first_name', 'last_name'], //
