| 1234567891011121314151617181920212223242526272829303132 |
- <?php
- declare (strict_types = 1);
- // +----------------------------------------------------------------------
- // |
- // +----------------------------------------------------------------------
- // |
- // +----------------------------------------------------------------------
- // |
- // +----------------------------------------------------------------------
- // |
- // +----------------------------------------------------------------------
- // +----------------------------------------------------------------------
- // | 写入管理日志
- // +----------------------------------------------------------------------
- namespace app\admin\middleware;
- use app\admin\model\Adminlog as AdminlogModel;
- use think\facade\Config;
- class AdminLog
- {
- public function handle($request, \Closure $next)
- {
- $response = $next($request);
- if (($request->isPost()) && Config::get('yzn.admin_auto_record_log')) {
- AdminLogModel::record();
- }
- return $response;
- }
- }
|