Get data via url

(Nan Do9) #1

I have

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 ');

(Softark) #2

Hi @nan_do9,

This will work, I hope.

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

(Nan Do9) #3

Thank you
I solved it this way