@php // Get the current URL with scheme and host $currentUrl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; // Parse the URL $parsedUrl = parse_url($currentUrl); // Reconstruct the URL without query parameters $urlWithoutParams = isset($parsedUrl['scheme']) ? $parsedUrl['scheme'] . '://' : ''; $urlWithoutParams .= isset($parsedUrl['host']) ? $parsedUrl['host'] : ''; $urlWithoutParams .= isset($parsedUrl['path']) ? $parsedUrl['path'] : ''; @endphp