mkamel/searchable
最新稳定版本:v0.4.0
Composer 安装命令:
composer require mkamel/searchable
包简介
README 文档
README
1- Add this line to your app.php file in providers array:
MKamel\Searchable\SearchableServiceProvider::class,
2- Use Searchable Trait in your Model.
3- That will make Search function available for you model
User::search([ 'name' => 'alex', 'older_than' => 20 ]);
4- Create your Filters:
class ByOlderThanFilter { public function apply($query, $key, $value) { return $query ->where('age', '>=', $value) } }
5- You can update the filters directory by changing filters_namespace in config file.
统计信息
- 总下载量: 12.98k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-12-31