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"]);
CodePudding user response:
You almost done in a correct way, simply change the order of the queries then it will be working fine.
$request->query->remove('key');
$request->request->remove('key');
