toanld/laravel-query-logger 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

toanld/laravel-query-logger

Composer 安装命令:

composer require toanld/laravel-query-logger

包简介

Log database queries for Laravel project

README 文档

README

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

Import package using composer:

composer require toanld/laravel-query-logger --dev

Add service to Laravel >=5.5

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

Add service to Laravel <5.5

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

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

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

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 :)

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-08-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固