2018-05-02 10:35:38 +00:00
|
|
|
# Lumen 的sql记录组件
|
2018-05-02 09:56:08 +00:00
|
|
|
|
2018-05-02 10:35:38 +00:00
|
|
|
### 引入
|
|
|
|
```bash
|
|
|
|
composer config repositories.lumen-sql-logger vcs git@git.int.haowumc.com:arch/lumen-sql-logger.git
|
|
|
|
composer require --dev arch/lumen-sql-logger
|
|
|
|
```
|
|
|
|
|
|
|
|
### 开启
|
2018-05-02 10:27:30 +00:00
|
|
|
```php
|
|
|
|
if (env('APP_ENV') == 'local') {
|
2018-05-02 10:35:38 +00:00
|
|
|
$app->register(Arch\EventServiceProvider::class);
|
2018-05-02 10:27:30 +00:00
|
|
|
}
|
2018-05-02 10:35:38 +00:00
|
|
|
```
|
2018-05-02 10:27:30 +00:00
|
|
|
|
2018-05-02 10:35:38 +00:00
|
|
|
###配置
|
|
|
|
在.env中增加如下配置
|
|
|
|
```bash
|
|
|
|
APP_NAME = api
|
2018-05-02 10:27:30 +00:00
|
|
|
```
|
2018-05-02 10:35:38 +00:00
|
|
|
|