user()) { abort(403, 'Unauthorized action.'); } foreach ($roles as $role) { if ($request->user()->hasRole($role)) { return $next($request); } } abort(403, 'Unauthorized action.'); } }