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