You cannot. It's the same as doing the following in PHP
$var = 'foo';
$var = 'bar';
echo $var; // returns 'bar', and there's no way you can go through its history, so to speak
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
We can pick up url params with something like Request::input('q').
So making a request like this can be handled nicely: GET https://www.myapi.com/api/v1/entity?q=param1
But how can we handle the following? (Note that there are two 'q' params): GET https://www.myapi.com/api/v1/entity?q=param1&q=param2
I would have expected Request::input('q') to return an array in this case with the multiple values, however it only returns the last value (i.e. param2).
I know we can handle multiple values on a single param with a comma separator for example: GET https://www.myapi.com/api/v1/entity?q=param1,param2
However I would also like to handle repeat multiple params. Below is a real world example from the google translate api using repeat params:
Any insights much appreciated!
Please or to participate in this conversation.