From dbd29c82fd878dbefdf43a8cf12d755c5ae2b9af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=80=99=E5=AD=A6=E6=9D=B0?= Date: Tue, 29 May 2018 21:32:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=BA=E5=88=B6=E4=BD=BF=E7=94=A8=20auth=20?= =?UTF-8?q?=E7=9A=84=20guard?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/PdAuth/Middleware/CheckRole.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, '无权访问');