Skip to content

Commit

Permalink
route params bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
刘正伟 committed Aug 15, 2019
1 parent 07ce1cb commit db50c45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Middleware/RunningTimeMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function handle($request, Closure $next)
$log = [
'time' => round(microtime(true) - LARAVEL_START, 2),
'path' => $path,
'params' => json_encode(['route_params' => $request->route()->parameters(), 'params' => $request->all()], JSON_UNESCAPED_UNICODE),
'params' => json_encode(['route_params' => $request->route() ? $request->route()->parameters() : null, 'params' => $request->all()], JSON_UNESCAPED_UNICODE),
];

$logText = implode('||', $log) . "\n";
Expand Down

0 comments on commit db50c45

Please sign in to comment.