<?phpuseSonsOfPHP\Component\HttpMessage\Uri;// Passing in the url is optional.$uri =newUri('https://docs.sonsofphp.com');// You can also pass in a more detailed url$uri =newUri('https://docs.sonsofphp.com/search/results?q=test');// You can also easily add additional query parameters$uri = $uri->withQueryParams(['page'=>1,'limit'=>25,'filters'=> ['isActive'=>1, ]]);// To remove all the query parameters, pass in `null`$uri = $uri->withQueryParams(null);