request->getQueryParams()

$request->getQueryParams();

http://127.0.0.1:8082/api/user?user.name=Elvis&user.city=Rio+Preto

$queryParams = [
‘user_name’ => ‘Elvis’,
‘user_city’ => ‘Rio Preto’
]

the right would return
$queryParams = [
user.name’ => ‘Elvis’,
‘user.city’ => ‘Rio Preto’
]

1 Like

The getQueryParams function uses PHP’s parse_str function which will convert things like dots and spaces to underscores. PHP variable names cannot contain periods so they are converted to underscores.

Dots and spaces in variable names are converted to underscores. For example <input name="a.b" /> becomes $_REQUEST["a_b"].

2 Likes

thanks for the answer