function currentTunnelUrl()
    {
        return retry(20, function () {
            $body = Request::get($this->tunnelsEndpoint)->send()->body;

            // If there are active tunnels on the Ngrok instance we will spin through them and
            // find the one responding on HTTP. Each tunnel has an HTTP and a HTTPS address
            // but for local testing purposes we just desire the plain HTTP URL endpoint.
            if (isset($body->tunnels) && count($body->tunnels) > 0) {
                return $this->findHttpTunnelUrl($body->tunnels);
            } else {
                throw new DomainException("Tunnel not established.");
            }
        }, 250);
    }
function currentTunnelUrl()
    {
        return retry(20, function () {
            $body = Request::get($this->tunnelsEndpoint)->send()->body;

            // If there are active tunnels on the Ngrok instance we will spin through them and
            // find the one responding on HTTP. Each tunnel has an HTTP and a HTTPS address
            // but for local testing purposes we just desire the plain HTTP URL endpoint.
            if (isset($body->tunnels) && count($body->tunnels) > 0) {
                return $this->findHttpTunnelUrl($body->tunnels);
            } else {
                throw new DomainException("Tunnel not established.");
            }
        }, 250);
    }
function currentTunnelUrl ( ) { return retry ( 20 , function ( ) { $ body = Request :: get ( $ this -> tunnelsEndpoint ) -> send ( ) -> body ; // If there are active tunnels on the Ngrok instance we will spin through them and // find the one responding on HTTP. Each tunnel has an HTTP and a HTTPS address // but for local testing purposes we just desire the plain HTTP URL endpoint. if ( isset ( $ body -> tunnels ) && count ( $ body -> tunnels ) > 0 ) { return $ this -> findHttpTunnelUrl ( $ body -> tunnels ) ; } else { throw new DomainException ( "Tunnel not established." ) ; } } , 250 ) ; }
Get the current tunnel URL from the Ngrok API.

@return string
Get the current tunnel URL from the Ngrok API .