protected function buildUrl($path, array $query, $fragment)
    {
        if (! empty($query)) {
            $separator = Str::contains($path, '?') ? '&' : '?';

            $path .= $separator .http_build_query($query, '', '&');
        }

        if (! empty($fragment)) {
            $path .= '#' .$fragment;
        }

        return $path;
    }
protected function buildUrl($path, array $query, $fragment)
    {
        if (! empty($query)) {
            $separator = Str::contains($path, '?') ? '&' : '?';

            $path .= $separator .http_build_query($query, '', '&');
        }

        if (! empty($fragment)) {
            $path .= '#' .$fragment;
        }

        return $path;
    }
protected function buildUrl ( $ path , array $ query , $ fragment ) { if ( ! empty ( $ query ) ) { $ separator = Str :: contains ( $ path , '?' ) ? '&' : '?' ; $ path .= $ separator . http_build_query ( $ query , '' , '&' ) ; } if ( ! empty ( $ fragment ) ) { $ path .= '#' . $ fragment ; } return $ path ; }
Build the full query portion of a URL.

@param  string  $path
@param  array  $query
@param  string|null  $fragment
@return string
Build the full query portion of a URL .