Skip to content

Latest commit

 

History

History
54 lines (38 loc) · 1.08 KB

README.md

File metadata and controls

54 lines (38 loc) · 1.08 KB

Basic Laravel Searching

Provides searching, searching with ranges, and sorting

Installation

You can install the package via composer:

composer require jianjye/laravel-basic-search

Usage

search - Search with exact match

\LaravelBasicSearch::search($request, $model, $fields, $ranges, $sorts);

fuzzySearch - Search with partial match %LIKE%

\LaravelBasicSearch::fuzzySearch($request, $model, $fields, $ranges, $sorts);

Searching with custom date

$dates = ['date_field' => 'd-m-Y'];

\LaravelBasicSearch::search($request, $model, $fields, $ranges, $sorts, $dates);

Sorting Links (to be used in Blade)

\LaravelBasicSearch::links($request, $sorts);

Sorting Icons (to be used in Blade)

\LaravelBasicSearch::icons($request, $sorts);

Testing

php vendor/phpunit/phpunit/phpunit

Credits

License

The MIT License (MIT). Please see License File for more information.