protected function parseOutputUrl($url, $file): string
    {
        if (is_string($url)) {
            $url = rtrim($url, '/') . '/' . ltrim($file,  '/');

            return $this->url->url($url);
        }

        if (is_array($url)) {
            $url = new UrlSettings($url);
        }

        if (!($url instanceof UrlSettings)) {
            throw new InvalidInstanceException('Url is not a valid instance of UrlSettings');
        }

        if (is_string($url->path)) {
            $url->path = explode('/', $url->path);
        }

        $url->path[] = $file;

        return $this->url->url($url);
    }
protected function parseOutputUrl($url, $file): string
    {
        if (is_string($url)) {
            $url = rtrim($url, '/') . '/' . ltrim($file,  '/');

            return $this->url->url($url);
        }

        if (is_array($url)) {
            $url = new UrlSettings($url);
        }

        if (!($url instanceof UrlSettings)) {
            throw new InvalidInstanceException('Url is not a valid instance of UrlSettings');
        }

        if (is_string($url->path)) {
            $url->path = explode('/', $url->path);
        }

        $url->path[] = $file;

        return $this->url->url($url);
    }
protected function parseOutputUrl ( $ url , $ file ) : string { if ( is_string ( $ url ) ) { $ url = rtrim ( $ url , '/' ) . '/' . ltrim ( $ file , '/' ) ; return $ this -> url -> url ( $ url ) ; } if ( is_array ( $ url ) ) { $ url = new UrlSettings ( $ url ) ; } if ( ! ( $ url instanceof UrlSettings ) ) { throw new InvalidInstanceException ( 'Url is not a valid instance of UrlSettings' ) ; } if ( is_string ( $ url -> path ) ) { $ url -> path = explode ( '/' , $ url -> path ) ; } $ url -> path [ ] = $ file ; return $ this -> url -> url ( $ url ) ; }
Get the url for output

@param $url
@param $file
@return string
@throws \Laranix\Support\Exception\InvalidInstanceException
Get the url for output