squareboat / sql-doctor
快速调试Laravel中每个请求的数据库查询数量。
v3.0.0
2017-10-15 15:14 UTC
Requires
- php: >=5.4.0
- illuminate/config: 5.1.*|5.2.*|5.3.*|5.4.*|5.5.*
- illuminate/database: 5.1.*|5.2.*|5.3.*|5.4.*|5.5.*
- illuminate/events: 5.1.*|5.2.*|5.3.*|5.4.*|5.5.*
- illuminate/http: 5.1.*|5.2.*|5.3.*|5.4.*|5.5.*
- illuminate/support: 5.1.*|5.2.*|5.3.*|5.4.*|5.5.*
- symfony/debug: 2.8.*|3.0.*|3.1.*|~3.2|~3.3
This package is auto-updated.
Last update: 2024-09-04 16:29:48 UTC
README
快速调试Laravel中每个请求的数据库查询数量。
安装
通过composer安装
对于Laravel <= 5.3,请使用1.1分支!
$ composer require squareboat/sql-doctor
配置Laravel
如果您使用的是laravel 5.5或更高版本,请跳过此步骤。
如果您使用的是laravel 5.4,只需将服务提供者添加到您的项目config/app.php
文件中
服务提供者
SquareBoat\SqlDoctor\SqlDoctorServiceProvider::class,
用法
现在当您的app.debug
设置为true
时,您可以在任何URL后附加?sql-doctor=1
,并获取运行查询的完整列表。
致谢
SQL Doctor,最初是在Reddit上的讨论线程中由magkopian发起。
许可证
MIT许可证。请参阅许可证文件以获取更多信息。版权所有 © 2017 SquareBoat