paidian/php-sql-logger

There is no license information available for the latest version (dev-main) of this package.

dev-main 2019-03-25 02:58 UTC

This package is not auto-updated.

Last update: 2024-10-18 17:13:13 UTC


README

引入该组件后,如果 APP_DEBUG = true 时,会自动将sql执行日志记录到 storage/logs/sql-{Y-m-d}.log 中。默认只保留最近15天的日志

引入

composer config repositories.php-sql-logger vcs git@git.int.haowumc.com:composer/php-sql-logger.git
composer require --dev paidian/php-sql-logger:dev-master

开启

if (env('APP_ENV') == 'local') {
    $app->register(Arch\SQLEventServiceProvider::class);
}

配置

在.env中增加如下配置

APP_NAME = api