From 2b9569d642c8434a923f09b199074fc8b4edb960 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=80=99=E5=AD=A6=E6=9D=B0?= Date: Mon, 11 Feb 2019 15:28:19 +0800 Subject: [PATCH] Update CheckRole.php --- src/Middleware/CheckRole.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, '无权访问');