user(); if (! $user || ! in_array($user->role, $roles, true)) { abort(403, '无访问权限'); } return $next($request); } }