In my Symfony project, I have requested an URL with query params, one added through array of same key value and one of type string returning me:
http://localhost/php-api/v1/examples/query?array=1&array=2&array=3&property=aa
I was referring to the DOCS but still did not get the solution I was looking for. In every way, the array key is always returning just the last one:
$request->query->all();
Get's me:
Array
(
[array] => 3
[property] => aa
)
I also did try other methods from the Request class, but non of them make it return all query params.
Does anyone know how to solve this?
Output I want:
{
"array": [
"1",
"2",
"3"
],
"property": "aa"
}