route('system.login'); } // Check if user is not an admin if (!isAdmin()) { return redirect('/'); } return $next($request); } }