承接 anik/laravel-query-logger 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

anik/laravel-query-logger

Composer 安装命令:

composer require anik/laravel-query-logger

包简介

A dev tool to log all queries for laravel/lumen application.

README 文档

README

📝 A dev tool to log all queries for Laravel/Lumen application.

Installing

$ composer require anik/laravel-query-logger --dev

Please keep the --dev option.

Usage

  1. You need to EXPLICITLY define LOG_DB_QUERIES to some values you wish. (bool) false will not log any query.
  2. If LOG_DB_QUERIES is set to daily, it'll log on daily basis.
  3. For Lumen you must have to register the ServiceProvider in bootstrap/app.php.
$app->register(Anik\LaravelQueryLogger\ServiceProvider::class);
$ tail -f storage/logs/queries.log

Or

$ tail -f storage/logs/queries-2019-01-27.log
============ URL: http://laravel.app/discussions ===============
[2019-01-27 18:52:14] [.....800μs] select count(*) as aggregate from `discussions` where `discussions`.`deleted_at` is null
[2019-01-27 18:52:14] [....1.07ms] select * from `discussions` where `discussions`.`deleted_at` is null order by `is_top` desc, `created_at` desc limit 15 offset 0
[2019-01-27 18:52:14] [.....3.63s] select `tags`.*, `taggables`.`taggable_id` as `pivot_taggable_id`, `taggables`.`tag_id` as `pivot_tag_id` from `tags` inner join `taggables` on `tags`.`id` = `taggables`.`tag_id` where `taggables`.`taggable_id` in ('1', '2', '3', '4', '5', '6', '7', '8') and `taggables`.`taggable_type` = 'App\\Models\\Discussion' order by `order_column` asc
[2019-01-27 18:52:14] [.....670μs] select * from `users` where `users`.`id` in ('1', '2', '4') and `users`.`deleted_at` is null
================================================================================

License

MIT

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 0
  • Forks: 46
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-01-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固