PHPackages                             ngoctp/laravel-query-logger - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. ngoctp/laravel-query-logger

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

ngoctp/laravel-query-logger
===========================

Log database queries for Laravel project

v1.0.8(7y ago)514.6k2[1 issues](https://github.com/ngoctp/laravel-query-logger/issues)MITPHP

Since Jun 28Pushed 6y ago2 watchersCompare

[ Source](https://github.com/ngoctp/laravel-query-logger)[ Packagist](https://packagist.org/packages/ngoctp/laravel-query-logger)[ RSS](/packages/ngoctp-laravel-query-logger/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (9)Dependencies (1)Versions (10)Used By (0)

Laravel Query Logger
====================

[](#laravel-query-logger)

A simple service provider to log all database queries into a file for Laravel framework

This package supports Laravel 5.0 and newer versions.

You can also use this package with Lumen.

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

[](#installation)

Import package using composer:

```
composer require ngoctp/laravel-query-logger --dev
```

### Add service to Laravel &gt;=5.5

[](#add-service-to-laravel-55)

There's nothing to do with Laravel 5.5, it's automatically imported by extra field defined in composer.json

### Add service to Laravel &lt;5.5

[](#add-service-to-laravel-55-1)

Put ServiceProvider to providers list in `config/app.php` file.

It's the best to place before AppServiceProvider to log all queries from beginning.

```
NgocTP\QueryLogger\ServiceProvider::class,
```

Publish configuration file using command:

```
php artisan vendor:publish --provider="NgocTP\QueryLogger\ServiceProvider"
```

### Add service to Lumen

[](#add-service-to-lumen)

If you're using Lumen, add below line to `bootstrap/app.php` file

```
$app->register(NgocTP\QueryLogger\ServiceProvider::class);

```

Display queries
---------------

[](#display-queries)

After installed successfully, you can open terminal and use `tail` command to display queries realtime to console

```
tail -f storage/logs/query_logger.log

```

That's all, thank you for using

Happy coding :)

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 95.7% 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 ~125 days

Recently: every ~165 days

Total

9

Last Release

2604d ago

### Community

Maintainers

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

---

Top Contributors

[![ngoctp](https://avatars.githubusercontent.com/u/4251459?v=4)](https://github.com/ngoctp "ngoctp (22 commits)")[![benallfree](https://avatars.githubusercontent.com/u/1068356?v=4)](https://github.com/benallfree "benallfree (1 commits)")

### Embed Badge

![Health badge](/badges/ngoctp-laravel-query-logger/health.svg)

```
[![Health](https://phpackages.com/badges/ngoctp-laravel-query-logger/health.svg)](https://phpackages.com/packages/ngoctp-laravel-query-logger)
```

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[beyondcode/laravel-server-timing

Add Server-Timing header information from within your Laravel apps.

5712.0M1](/packages/beyondcode-laravel-server-timing)[rollbar/rollbar-laravel

Rollbar error monitoring integration for Laravel projects

14110.4M7](/packages/rollbar-rollbar-laravel)[yadahan/laravel-authentication-log

Laravel Authentication Log provides authentication logger and notification for Laravel.

416632.8k5](/packages/yadahan-laravel-authentication-log)[kitloong/laravel-app-logger

Laravel log for your application

101.2M8](/packages/kitloong-laravel-app-logger)[label84/laravel-auth-log

Log user authentication actions in Laravel.

3654.0k](/packages/label84-laravel-auth-log)

PHPackages © 2026

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