Get data via url

I have
/mycontroller/index1?modelSearch%5Bdate%5D=2019-09-26±+2019-09-27

I need to get the date value of the url using the get method, as I would do
I’ve tried the following but it doesn’t work for me
$request = Yii::$app->request;
$date= $request->get('date ');

Hi @nan_do9,

This will work, I hope.

$date = $request->get('modelSearch[date]');
1 Like

Thank you
I solved it this way
$date=Yii::$app->request->get(“modelSearch”)[“date”];