123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- namespace app\http\middleware\admin;
- use app\Request;
- use app\jobs\system\AdminLogJob;
- use qiniu\interfaces\MiddlewareInterface;
- class AdminLogMiddleware implements MiddlewareInterface
- {
-
- public function handle(Request $request, \Closure $next)
- {
- $module = $request->method();
- $params = $request->param();
- $rule = trim(strtolower($request->rule()->getRule()));
-
- AdminLogJob::dispatch([$request->adminId(), $request->adminInfo()['account'], $module, $rule, $request->ip(), 'system', json_encode($params)]);
- return $next($request);
- }
- }
|