定制 zxygel0913/query-logger-middleware 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

zxygel0913/query-logger-middleware

最新稳定版本:v1.3

Composer 安装命令:

composer require zxygel0913/query-logger-middleware

包简介

Laravel middleware for logging queries with duplicate prevention.

README 文档

README

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

Installation

You can install this package via Composer:

composer require zxygel0913/query-logger-middleware

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

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

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

License

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

统计信息

  • 总下载量: 35
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-08-03