强制使用 auth 的 guard
This commit is contained in:
parent
216c41e7cd
commit
dbd29c82fd
|
@ -22,7 +22,7 @@ class CheckRole
|
||||||
return $next($request);
|
return $next($request);
|
||||||
}
|
}
|
||||||
|
|
||||||
$user = $request->user();
|
$user = $request->user('auth');
|
||||||
|
|
||||||
if (empty($user) || empty($user['roles'])) {
|
if (empty($user) || empty($user['roles'])) {
|
||||||
abort(403, '无权访问');
|
abort(403, '无权访问');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user