src/DTOUrl/Url.php
public function addQuery(array $query)
    {
        $queryParts = [];
        foreach ($query as $key => $value) {
            $queryParts[] = "{$key}={$value}";
        }

        $this->fullUrl['query'] = '?' . implode('&', $queryParts);

        return $this;
    }
public function addQuery(array $query)
    {
        $queryParts = [];
        foreach ($query as $key => $value) {
            $queryParts[] = "{$key}={$value}";
        }

        $this->fullUrl['query'] = '?' . implode('&', $queryParts);

        return $this;
    }
public function addQuery ( array $ query ) { $ queryParts = [ ] ; foreach ( $ query as $ key => $ value ) { $ queryParts [ ] = "{$key}={$value}" ; } $ this -> fullUrl [ 'query' ] = '?' . implode ( '&' , $ queryParts ) ; return $ this ; }
Add query string to the final url

@param array $query
@return Url
Add query string to the final url