sakiot/laravel-sql-spy
Composer 安装命令:
composer require sakiot/laravel-sql-spy
包简介
README 文档
README
SQL query aggregation tool for refactoring
(!)This library is under development.
Laravel Sql Spy is a tool for inspecting the SQL queries issued by your application built with Laravel. To find duplicate and redundant queries that are the main source of load, it's not enough to just get a list of query submission logs.
Laravel Sql Spy groups issued queries and supports refactoring efficiently.
Requirements
- PHP >= 8.x
- Laravel >= 8.x
Installation
Step 1: Install package
Use Composer command to add the package.
composer require sakiot/laravel-sql-spy
Step 2: Register Service Provider
Register the Service Provider in your config file.
// config/app.php 'providers' => [ // Application Service Providers... // ... // Other Service Providers... LaravelSqlSpy\LaravelSqlSpyServiceProvider::class, // add ],
Usage
Turn on debug mode in your environment file.
// .env
APP_DEBUG=true
Then you will see the Sql Spy button on the top right of the page. By clicking this button, you can download the csv file.
Currently, I'm using sessions to hold data. So if you open multiple tabs in your browser, the data of the last opened page will be retrieved. The "page where the button was clicked" is irrelevant. You will always get the "last opened page" information!
sakiot/laravel-sql-spy 适用场景与选型建议
sakiot/laravel-sql-spy 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 287 次下载、GitHub Stars 达 0, 最近一次更新时间为 2022 年 08 月 03 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 sakiot/laravel-sql-spy 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 sakiot/laravel-sql-spy 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 287
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 16
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-08-03