PHPackages                             zxygel0913/query-logger-middleware - 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. zxygel0913/query-logger-middleware

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

zxygel0913/query-logger-middleware
==================================

Laravel middleware for logging queries with duplicate prevention.

v1.3(2y ago)035MITPHPPHP ^7.4

Since Aug 3Pushed 2y ago1 watchersCompare

[ Source](https://github.com/zxygel0913/QueryLoggerMiddleware)[ Packagist](https://packagist.org/packages/zxygel0913/query-logger-middleware)[ RSS](/packages/zxygel0913-query-logger-middleware/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (4)DependenciesVersions (5)Used By (0)

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

[](#laravel-query-logger-middleware)

The Laravel Query Logger Middleware is a package that provides a middleware for logging database queries with duplicate prevention in Laravel applications.

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

[](#installation)

You can install this package via Composer:

```
composer require zxygel0913/query-logger-middleware
```

Usage
=====

[](#usage)

To use the Query Logger Middleware, you can add it to your routes or controllers:

```
use Zxygel0913\QueryLoggerMiddleware\LogQueries;

// ...

public function __construct()
{
    $this->middleware(LogQueries::class);
}
```

The middleware will automatically log executed database queries along with additional context such as URL origin and IP address.

Configuration
=============

[](#configuration)

The package provides the flexibility to customize the middleware behavior by publishing its configuration file. To publish the configuration file, run the following command:

```
php artisan vendor:publish --tag=query-logger-config
```

This will create a query-logger.php configuration file in your application's config directory. You can modify this file to adjust the middleware's settings.

Contributing
============

[](#contributing)

Contributions are welcome! If you encounter any issues or have suggestions for improvements, please open an issue on GitHub.

License
=======

[](#license)

This package is open-source software licensed under the MIT license.

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~2 days

Total

4

Last Release

1061d ago

PHP version history (2 changes)v1PHP ^8.1

v1.3PHP ^7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/925bf13eadcfec9cf5450b0fa987a546094f4c58566c209590a6c17a7046389c?d=identicon)[zxygel0913](/maintainers/zxygel0913)

---

Top Contributors

[![zxygel0913](https://avatars.githubusercontent.com/u/68549062?v=4)](https://github.com/zxygel0913 "zxygel0913 (23 commits)")

---

Tags

middlewarelaravelquery logging

### Embed Badge

![Health badge](/badges/zxygel0913-query-logger-middleware/health.svg)

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

###  Alternatives

[moesif/moesif-laravel

Moesif Collection/Data Ingestion Middleware for Laravel

1168.8k](/packages/moesif-moesif-laravel)[melihovv/laravel-log-viewer

A Laravel log viewer

1231.6k1](/packages/melihovv-laravel-log-viewer)

PHPackages © 2026

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