PHPackages                             sakiot/laravel-sql-spy - 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. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. sakiot/laravel-sql-spy

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

sakiot/laravel-sql-spy
======================

v0.0.1-alpha.3(3y ago)0258↓25%MITPHPPHP &gt;=8.0

Since Aug 4Pushed 3y ago1 watchersCompare

[ Source](https://github.com/SakiTakamachi/laravel-sql-spy)[ Packagist](https://packagist.org/packages/sakiot/laravel-sql-spy)[ RSS](/packages/sakiot-laravel-sql-spy/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (7)Used By (0)

Laravel Sql Spy
===============

[](#laravel-sql-spy)

[![StyleCI](https://camo.githubusercontent.com/e10456f25ebe6346afc8ad9a17c74b154107fd9d904e89b04c8fd1367b388a9e/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3532303838343038362f736869656c643f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/e10456f25ebe6346afc8ad9a17c74b154107fd9d904e89b04c8fd1367b388a9e/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3532303838343038362f736869656c643f6272616e63683d6d6173746572)

SQL query aggregation tool for refactoring
------------------------------------------

[](#sql-query-aggregation-tool-for-refactoring)

(!)This library is under development.

Laravel Sql Spy is a tool for inspecting the SQL queries issued by your application built with Laravel. To find duplicate and redundant queries that are the main source of load, it's not enough to just get a list of query submission logs.

Laravel Sql Spy groups issued queries and supports refactoring efficiently.

Requirements
------------

[](#requirements)

- PHP &gt;= 8.x
- Laravel &gt;= 8.x

Installation
------------

[](#installation)

### Step 1: Install package

[](#step-1-install-package)

Use Composer command to add the package.

```
composer require sakiot/laravel-sql-spy

```

### Step 2: Register Service Provider

[](#step-2-register-service-provider)

Register the Service Provider in your config file.

```
// config/app.php

'providers' => [
    // Application Service Providers...
    // ...

    // Other Service Providers...
    LaravelSqlSpy\LaravelSqlSpyServiceProvider::class, // add
],
```

Usage
-----

[](#usage)

Turn on debug mode in your environment file.

```
// .env

APP_DEBUG=true

```

Then you will see the Sql Spy button on the top right of the page. By clicking this button, you can download the csv file.

Currently, I'm using sessions to hold data. So if you open multiple tabs in your browser, the data of the last opened page will be retrieved. The "page where the button was clicked" is irrelevant. You will always get the "last opened page" information!

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.2% of commits — single point of failure

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 ~0 days

Total

3

Last Release

1384d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/53299f3c3e6b8654e99f64274bdaa41d8d54f063951d848ff4d0c9ecdac0a7eb?d=identicon)[SakiTakamachi](/maintainers/SakiTakamachi)

---

Top Contributors

[![SakiTakamachi](https://avatars.githubusercontent.com/u/34942839?v=4)](https://github.com/SakiTakamachi "SakiTakamachi (46 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (8 commits)")

### Embed Badge

![Health badge](/badges/sakiot-laravel-sql-spy/health.svg)

```
[![Health](https://phpackages.com/badges/sakiot-laravel-sql-spy/health.svg)](https://phpackages.com/packages/sakiot-laravel-sql-spy)
```

###  Alternatives

[fruitcake/laravel-telescope-toolbar

Toolbar for Laravel Telescope based on Symfony Web Profiler

8041.6M3](/packages/fruitcake-laravel-telescope-toolbar)[laracraft-tech/laravel-xhprof

Easy XHProf setup to profile your laravel application!

235321.4k](/packages/laracraft-tech-laravel-xhprof)[spatie/laravel-artisan-dd

Run dd from your commandline

16387.7k1](/packages/spatie-laravel-artisan-dd)[bavix/laravel-xhprof

Quick profiling of your code for Laravel

22156.6k](/packages/bavix-laravel-xhprof)[daylerees/anbu

The Anbu profiler for Laravel 4.

3054.9k](/packages/daylerees-anbu)[thehocinesaad/laravel-error-ai

This package adds Ask AI button to the error page.

2214.4k](/packages/thehocinesaad-laravel-error-ai)

PHPackages © 2026

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