PHPackages                             wujunze/laravel-debug-helper - 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. wujunze/laravel-debug-helper

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

wujunze/laravel-debug-helper
============================

Laravel package to help debug

v2.0.2(6y ago)72.2k↓66.7%1MITPHPPHP ^7.1CI failing

Since Oct 20Pushed 6y ago1 watchersCompare

[ Source](https://github.com/wujunze/laravel-debug-helper)[ Packagist](https://packagist.org/packages/wujunze/laravel-debug-helper)[ RSS](/packages/wujunze-laravel-debug-helper/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (5)Versions (5)Used By (0)

laravel-debug-helper
====================

[](#laravel-debug-helper)

Laravel package to help debug This package allows you to log SQL queries (and slow SQL queries) to log file in Laravel framework

[![Build Status](https://camo.githubusercontent.com/3fd0c1c5293458665a0c97bc71bdffbdb3bd7b0f4861168daf596199193e772e/68747470733a2f2f7472617669732d63692e6f72672f77756a756e7a652f6c61726176656c2d64656275672d68656c7065722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/wujunze/laravel-debug-helper)[![Latest Stable Version](https://camo.githubusercontent.com/10c885f177d53190f48366b6edf2eca18bc3a8ca93a7f2b8d40b0b913fa0e3e4/68747470733a2f2f706f7365722e707567782e6f72672f77756a756e7a652f6c61726176656c2d64656275672d68656c7065722f762f737461626c652e737667)](https://packagist.org/packages/wujunze/laravel-debug-helper)[![Licence](https://camo.githubusercontent.com/43c4144d06decd799340178a05d796256289bade5e5a1428906fec97be4c2acf/68747470733a2f2f706f7365722e707567782e6f72672f77756a756e7a652f6c61726176656c2d64656275672d68656c7065722f6c6963656e73652e737667)](https://packagist.org/packages/wujunze/laravel-debug-helper)[![Total Downloads](https://camo.githubusercontent.com/7f12b6c405e131815673db80f69a138926426935da0f80ff1f8420872015e83a/68747470733a2f2f706f7365722e707567782e6f72672f77756a756e7a652f6c61726176656c2d64656275672d68656c7065722f646f776e6c6f6164732e737667)](https://packagist.org/packages/wujunze/laravel-debug-helper)

Inspiration and Thanks
----------------------

[](#inspiration-and-thanks)

[mnabialek/laravel-sql-logger](https://github.com/mnabialek/laravel-sql-logger)
[lingxi/laravel-sql-log](https://github.com/lingxi/laravel-sql-log)

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

[](#installation)

```
 composer require wujunze/laravel-debug-helper --dev
```

Please keep the `--dev` option. (it's recommended to use this package only for development). The Logger will be enabled when APP\_DEBUG is true

Configuration
-------------

[](#configuration)

If you use Laravel &lt; 5.5 open `app/Providers/AppServiceProvider.php` and in `register` method add:

```
public function register()
{
    if ($this->app['config']->get('app.debug')) {
        $this->app->register(WuJunze\LaravelDebugHelper\Providers\ServiceProvider::class);
    }
}
```

> Laravel 5.5 uses Package Auto-Discovery and it will automatically load this service provider so you don't need to add anything into above file.

If you use Laravel &lt; 5.5 run:

```
php artisan vendor:publish --provider="WuJunze\LaravelDebugHelper\Providers\ServiceProvider"
```

in your console to publish default configuration files.

#### If you are using Laravel 5.5 run:

[](#if-you-are-using-laravel-55-run)

```
php artisan vendor:publish
```

and choose the number matching `"WuJunze\LaravelDebugHelper\Providers\ServiceProvider"` provider. This operation will create config file in `config/debug_helper.php`. By default you should not edit published file because all the settings are loaded from `.env` file by default.

For Lumen you should skip this step.

#### In your .env file add the following entries:

[](#in-your-env-file-add-the-following-entries)

```
# Whether all SQL queries should be logged
SQL_LOG_QUERIES=true

# Whether slow SQL queries should be logged (you can log all queries and
# also slow queries in separate file or you might to want log only slow queries)
SQL_LOG_SLOW_QUERIES=true

# Time of query (in milliseconds) when this query is considered as slow
SQL_SLOW_QUERIES_MIN_EXEC_TIME=100

#Whether slow SQL queries should be logged (you can log all queries and
#also slow queries in separate file or you might to want log only slow queries)
SQL_LOG_OVERRIDE=false

# Directory where log files will be saved
SQL_LOG_DIRECTORY=logs/sql

# Whether execution time in log file should be displayed in seconds(by default it's in milliseconds)
SQL_CONVERT_TIME_TO_SECONDS=false

# Whether artisan queries should be logged to separate files
SQL_LOG_SEPARATE_ARTISAN=false

```

License
-------

[](#license)

MIT

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 93.8% 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 ~129 days

Total

4

Last Release

2371d ago

Major Versions

v1.0.4 → v2.0.12019-11-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/0bf502ba4ce9952fcb8a819f9aca3fa616e237ad8d59a47b9071710e95422c1d?d=identicon)[wujunze](/maintainers/wujunze)

---

Top Contributors

[![wujunze](https://avatars.githubusercontent.com/u/12997869?v=4)](https://github.com/wujunze "wujunze (15 commits)")[![comdeng](https://avatars.githubusercontent.com/u/5013951?v=4)](https://github.com/comdeng "comdeng (1 commits)")

---

Tags

helperlaravelpackagesql-logginglaravelloggingsqldebug-helper

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/wujunze-laravel-debug-helper/health.svg)

```
[![Health](https://phpackages.com/badges/wujunze-laravel-debug-helper/health.svg)](https://phpackages.com/packages/wujunze-laravel-debug-helper)
```

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.2M21](/packages/anourvalar-eloquent-serialize)[danielme85/laravel-log-to-db

Custom Laravel Log channel handler that can store log events to SQL or MongoDB databases. Uses Laravel native logging functionality.

135934.5k1](/packages/danielme85-laravel-log-to-db)[supliu/laravel-query-monitor

Laravel Query Monitor

287111.9k](/packages/supliu-laravel-query-monitor)[ramadan/easy-model

A Laravel package for enjoyably managing database queries.

101.6k](/packages/ramadan-easy-model)

PHPackages © 2026

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