Download the PHP package juniora/laravel-nova-search without Composer
On this page you can find all versions of the php package juniora/laravel-nova-search. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download juniora/laravel-nova-search
More information about juniora/laravel-nova-search
Files in juniora/laravel-nova-search
Package laravel-nova-search
Short Description A package that extends search for laravel nova
License MIT
Homepage https://github.com/akki-io/laravel-nova-search
Informations about the package laravel-nova-search
Laravel Nova Search
Testing Statuses
MySQL -
SQLite -
pgSQL -
This package provides a trait that extends the search behaviour of laravel nova resource.
Installation
You can install the package via composer:
Next, add AkkiIo\LaravelNovaSearch\LaravelNovaSearchable
trait to your base resource App\Nova\Resource
class.
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.
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.
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.
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.
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.
Nested relationships
You may search nested relationships using dot notation.
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.
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.
Testing
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Akki Khare
- Nova Search Relationship Package
- All Contributors
License
The MIT License (MIT). Please see License File for more information.