alive2212 / laravel-query-helper
Laravel 查询助手
v4.0.5
2023-04-04 11:17 UTC
Requires
- php: >=7.3
- illuminate/container: >=8
- illuminate/support: >=8
Requires (Dev)
- illuminate/container: >=8
- phpunit/phpunit: >=5.4.3
- squizlabs/php_codesniffer: >=2.3
README
注意: 请在 README.md、CHANGELOG.md、CONTRIBUTING.md、LICENSE.md 和 composer.json 文件中将 Babak Nodoust
https://github.com/Alive2212
http://babakn.com
alive2212@yahoo.com
Alive2212
LaravelQueryHelper
Laravel Query Helper
替换为正确的值,然后删除此行。您可以通过在命令行中运行 $ php prefill.php
一次性完成所有替换。同时删除 prefill.php 文件。
此包是智能深度where条件助手。您可以通过在模型之间使用"."来轻松创建具有多个关系的深度where条件,并获取结果。
结构
bin/
config/
src/
tests/
vendor/
安装
通过Composer
$ composer require alive2212/laravel-query-helper
用法
要使用,只需发送如下数组过滤器
protected $filters = [ // or where condition every thing here [ // and where condition every thing here ['id', '=', 1], ['title', '=', 'test'], ['folan.id', '=', 2], ['folan.bahman.id', '=', 3], ['folan.title', '=', 'test'], ['folan.bahman.amount', '>', 1000], ], [ ['id', '=', 4], ['folan.id', '=', 5], ['folan.title', '=', 'test123'], ['folan.bahman.id', '=', 1], ['folan.bahman.title', '=', 'test2'], ], [ ['id', '=', 7], ['folan.id', '=', 8], ['folan.title', '=', 'test1234'], ['folan.bahman.id', '=', 9], ['folan.bahman.title', '=', 'test21'], ] ];
变更日志
有关最近更改的更多信息,请参阅 CHANGELOG。
测试
$ composer test
贡献
有关详细信息,请参阅 CONTRIBUTING 和 CODE_OF_CONDUCT。
安全
如果您发现任何安全问题,请通过电子邮件 alive2212@yahoo.com 联系,而不是使用问题跟踪器。
鸣谢
许可证
MIT许可证(MIT)。有关更多信息,请参阅 许可证文件。