I am using Yii framework for my project;
I am redirecting page after success of insertion in database to another controller using
$this->redirect($this->createUrl('controller/action'));
During the redirection is it possible to pass any parameters just like in render,
$this->render('selectRefiner', array('param' => $data)
Try:
$this->redirect(array('controller/action', 'param1'=>'value1', 'param2'=>'value2',...))
api yii 1, api yii 2
try this:
Yii::$app->response->redirect(['site/dashboard','id' => 1, 'var1' => 'test']);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With