squareboat/sql-doctor

Quickly debugging the amount of database queries per request in Laravel.

v3.0.0 2017-10-15 15:14 UTC

This package is auto-updated.

Last update: 2024-11-04 16:55:26 UTC


README

Quickly debugging the amount of database queries per request in Laravel.

sql-doctor example image

Install

Install via composer

For Laravel <= 5.3, please use the 1.1 branch!

$ composer require squareboat/sql-doctor

Configure Laravel

If you are using laravel 5.5 or higher you should skip this step.

If you are using laravel 5.4, simply add the service provider to your project's config/app.php file:

Service Provider

SquareBoat\SqlDoctor\SqlDoctorServiceProvider::class,

Usage

Now while your app.debug is set true then on any URL you can append ?sql-doctor=1 and get an output of complete list of queries that ran.

Credits

SQL Doctor, originally developed after the reddit thread by magkopian.

License

The MIT License. Please see License File for more information. Copyright © 2017 SquareBoat