I am trying to remove the url parameters based on some conditions ,i can able to remove some of the parameters , i want to replace the some new value for the url, can you please give me some idea how to do this one
$request->query->remove('key');
$request->query->add(['admin'=>"true"]);
$request->request->remove('key');
$request->request->add(['admin'=>"true"]);
http://localhost.com/users?limit=25&page=1&search=xyz, you apply the code you posted, is something not replaced? What does the request/url look like after that? (Might be I'm completely misunderstanding your question)