PHPackages                             toanld/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. toanld/laravel-query-logger

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

toanld/laravel-query-logger
===========================

Log database queries for Laravel project

v1.0.6(8y ago)0178MITPHP

Since Jun 28Pushed 7y agoCompare

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

READMEChangelogDependencies (1)Versions (8)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 toanld/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

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 70.4% 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 ~99 days

Recently: every ~146 days

Total

7

Last Release

3062d ago

### Community

Maintainers

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

---

Top Contributors

[![ngoctp](https://avatars.githubusercontent.com/u/4251459?v=4)](https://github.com/ngoctp "ngoctp (19 commits)")[![robinhofs](https://avatars.githubusercontent.com/u/670503?v=4)](https://github.com/robinhofs "robinhofs (7 commits)")[![minhngoc2512](https://avatars.githubusercontent.com/u/25582495?v=4)](https://github.com/minhngoc2512 "minhngoc2512 (1 commits)")

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

87411.3M154](/packages/spatie-laravel-health)[illuminate/log

The Illuminate Log package.

6225.0M603](/packages/illuminate-log)[spatie/laravel-flare

Send Laravel errors to Flare

111.2M6](/packages/spatie-laravel-flare)

PHPackages © 2026

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