Package Data | |
---|---|
Maintainer Username: | santty |
Maintainer Contact: | santiago.l.monteiro@gmail.com (Santiago Lima Monteiro) |
Package Create Date: | 2017-04-06 |
Package Last Update: | 2017-09-23 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-22 15:01:56 |
Package Statistics | |
---|---|
Total Downloads: | 21 |
Monthly Downloads: | 1 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
a simple trait to use with your Laravel Models
composer require ssistemas/searchable:"1.*"
just add in your models
class User extends Model
{
use Ssistemas\Searchable\Traits\Searchable;
private $searchable = [
'columns'=>['category.name'],
'joins'=>[
'customers' => ['category.id','user.category_id'],
],
'orders'=>['category.name,asc'],
];
...
}
you can also use controller
$users = User::search($value)->get();