f-liva/eloquent-to-raw-sql
最新稳定版本:1.0.2
Composer 安装命令:
composer require f-liva/eloquent-to-raw-sql
包简介
Exposes the eloquent toRawSql method to display the raw query in beautified form.
README 文档
README
Exposes the eloquent toRawSql method to display the raw query in beautified form.
Install
composer require f-liva/eloquent-to-raw-sql
Use
$products = Product ::where('availability', 'available') ->where('type', 'goods') ->groupBy('category') ->orderByDesc('price') ->limit(10); dump($products->toRawSql()); // Beautified SQL (as default) // SELECT // * // FROM // `products` // WHERE // `products`.`availability` = 'available' // AND `products`.`type` = 'goods' // GROUP BY // `products`.`category` // ORDER BY // `products`.`price` DESC // LIMIT 10; dump($products->toRawSql(false)); // Unbeautified SQL // SELECT * FROM `products` WHERE `products`.`availability` ...
统计信息
- 总下载量: 202
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-11-21