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)0284↓70.6%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 today

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 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity43

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

1431d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/34942839?v=4)[Saki Takamachi](/maintainers/SakiTakamachi)[@SakiTakamachi](https://github.com/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

[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135224.7k7](/packages/statamic-rad-pack-runway)[api-platform/laravel

API Platform support for Laravel

58171.6k14](/packages/api-platform-laravel)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21318.6k3](/packages/ecotone-laravel)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3417.0k](/packages/duncanmcclean-statamic-cargo)

PHPackages © 2026

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