user(); if ($operator === null || $operator->two_factor_confirmed_at !== null) { return $next($request); } // The two pages that must stay reachable: where two-factor is // enrolled, and signing out. if (AdminArea::routeIs('admin.two-factor-setup') || $request->routeIs('admin.logout')) { return $next($request); } return redirect()->route('admin.two-factor-setup') ->with('status', __('admin_settings.two_factor_required')); } }