src/Support/Reflection/EntityReflector.php
public static function parseResourceIDFromURL($url)
    {
        if (is_null($url)) {
            throw new EntityReflectionException("Resource ID can't be parsed, null url");
        }

        $resourceLocationParts = explode('/', $url);

        if ( ! is_array($resourceLocationParts)) {
            throw new EntityReflectionException("Resource ID not found in request, location: {$url}");
        }

        $id = intval(end($resourceLocationParts));

        if ($id === 0) {
            throw new EntityReflectionException("Invalid resource ID found in request, location: {$url}");
        }

        return $id;
    }
public static function parseResourceIDFromURL($url)
    {
        if (is_null($url)) {
            throw new EntityReflectionException("Resource ID can't be parsed, null url");
        }

        $resourceLocationParts = explode('/', $url);

        if ( ! is_array($resourceLocationParts)) {
            throw new EntityReflectionException("Resource ID not found in request, location: {$url}");
        }

        $id = intval(end($resourceLocationParts));

        if ($id === 0) {
            throw new EntityReflectionException("Invalid resource ID found in request, location: {$url}");
        }

        return $id;
    }
@param $url

@return int

@throws EntityReflectionException