how to pass parameter on redirect in yii

Abhi picture Abhi · Dec 5, 2012 · Viewed 62.2k times · Source

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)

Answer

driver_by picture driver_by · Dec 5, 2012

Try:

$this->redirect(array('controller/action', 'param1'=>'value1', 'param2'=>'value2',...))

api yii 1, api yii 2