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
其他信息
- 授权协议: MIT
- 更新时间: 2023-08-03