src/Chromabits/TutumClient/Support/EnvUtils.php
protected function getUuidFromUrl(Url $url)
    {
        $segments = $url->getPathSegments();

        if (count($segments) < 1) {
            throw new Exception('Invalid UUID');
        }

        if (count($segments) < 2) {
            return $segments[0];
        }

        return $segments[count($segments) - 2];
    }
protected function getUuidFromUrl(Url $url)
    {
        $segments = $url->getPathSegments();

        if (count($segments) < 1) {
            throw new Exception('Invalid UUID');
        }

        if (count($segments) < 2) {
            return $segments[0];
        }

        return $segments[count($segments) - 2];
    }
protected function getUuidFromUrl ( Url $ url ) { $ segments = $ url -> getPathSegments ( ) ; if ( count ( $ segments ) < 1 ) { throw new Exception ( 'Invalid UUID' ) ; } if ( count ( $ segments ) < 2 ) { return $ segments [ 0 ] ; } return $ segments [ count ( $ segments ) - 2 ] ; }
Extract the last part of a URL

which in Tutum's case is usually the UUID

@param Url $url

@return mixed
@throws Exception
Extract the last part of a URL