diff --git a/src/Middleware/CheckRole.php b/src/Middleware/CheckRole.php index 3a13105..549ab4c 100644 --- a/src/Middleware/CheckRole.php +++ b/src/Middleware/CheckRole.php @@ -22,7 +22,7 @@ class CheckRole return $next($request); } - $user = $request->user('auth'); + $user = $request->user(); if (empty($user) || empty($user['roles'])) { abort(403, '无权访问');