PHPackages                             squareboat/sql-doctor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. squareboat/sql-doctor

ActiveLibrary[Database &amp; ORM](/categories/database)

squareboat/sql-doctor
=====================

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

v3.0.0(8y ago)571.4k1MITPHPPHP &gt;=5.4.0

Since Dec 6Pushed 8y ago2 watchersCompare

[ Source](https://github.com/squareboat/sql-doctor)[ Packagist](https://packagist.org/packages/squareboat/sql-doctor)[ RSS](/packages/squareboat-sql-doctor/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (2)Dependencies (6)Versions (8)Used By (0)

Debugging Database Queries
==========================

[](#debugging-database-queries)

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

[![sql-doctor example image](sql-doctor.png?raw=true "Sql Doctor")](sql-doctor.png?raw=true)

Install
-------

[](#install)

### Install via composer

[](#install-via-composer)

#### For Laravel &lt;= 5.3, please use the [1.1 branch](https://github.com/squareboat/sql-doctor/tree/v1.1)!

[](#for-laravel--53-please-use-the-11-branch)

```
$ composer require squareboat/sql-doctor

```

### Configure Laravel

[](#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

[](#service-provider)

```
SquareBoat\SqlDoctor\SqlDoctorServiceProvider::class,

```

Usage
-----

[](#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.

Query ParamValueOutputsql-doctor1Default querysql-doctor2Binds values to their parameters in the query.Credits
-------

[](#credits)

SQL Doctor, originally developed after the [reddit thread](https://www.reddit.com/r/laravel/comments/5f7y9f/debugging_the_amount_of_database_queries_per) by [magkopian](https://www.reddit.com/user/magkopian).

License
=======

[](#license)

The MIT License. Please see [License File](LICENSE.md) for more information. Copyright © 2017 [SquareBoat](https://squareboat.com)

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~52 days

Recently: every ~65 days

Total

7

Last Release

3180d ago

Major Versions

v1.1.0 → v2.0.x-dev2017-01-27

v1.1.x-dev → v2.0.02017-01-27

v2.0.0 → v3.0.x-dev2017-10-15

### Community

Maintainers

![](https://www.gravatar.com/avatar/30e21dae13b2087420f27a7fcfbcd0eea333569041ccbfab4d1b210146eacc3d?d=identicon)[akaamitgupta](/maintainers/akaamitgupta)

![](https://www.gravatar.com/avatar/e74cbbaa7a9f04e41076efcc4a69efd1185030b55cd90c3ce8b0201499618b06?d=identicon)[squareboat1](/maintainers/squareboat1)

---

Tags

sqllaraveldebugdatabasequeries

### Embed Badge

![Health badge](/badges/squareboat-sql-doctor/health.svg)

```
[![Health](https://phpackages.com/badges/squareboat-sql-doctor/health.svg)](https://phpackages.com/packages/squareboat-sql-doctor)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M337](/packages/psalm-plugin-laravel)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M125](/packages/laravel-pulse)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M123](/packages/roots-acorn)[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.4M91](/packages/mongodb-laravel-mongodb)[api-platform/laravel

API Platform support for Laravel

59156.3k11](/packages/api-platform-laravel)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
