uteq/laravel-query-builder-macros
最新稳定版本:1.0.8
Composer 安装命令:
composer require uteq/laravel-query-builder-macros
包简介
A set of common Laravel Uteq helpers and macros
README 文档
README
Adds useful functionality to the Laravel Query Builder
Illuminate\Database\Query\Builder.
Installation
composer require uteq/laravel-query-builder-macros
Or add the Uteq Laravel Support package
composer require uteq/laravel-support
rawQuery
$rawQuery = Account::query() ->where('email', 'john') ->getQuery() // You need to do this to get the rawQuery ->rawQuery(); // return `select * from "account" where "email" = 'john'`
ddQuery
Account::query() ->where('email', 'john') ->ddQuery(); // dd() of `select * from "account" where "email" = 'john'`
dumpQuery
Account::query() ->where('email', 'john') ->dumpQuery(); // dump() of `select * from "account" where "email" = 'john'` // the execution of the script will continue
rayQuery
Account::query() ->where('email', 'john') ->rayQuery(); // ray() of `select * from "account" where "email" = 'john'` // the execution of the script will continue
Inspiration by
Building this package I got inspired by the following:
- https://stackoverflow.com/a/53337416
- http://github.com/spatie/laravel-collection-macros
- https://github.com/spatie/package-skeleton-laravel
Credits
Testing
$ composer test
About Uteq
We are a web development agency based in the Netherlands. We design and build web applications for our clients. We are specialized in Laravel with Livewire.
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 1.53k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 20
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-03-25