Monday, 24 November 2014

Yii2: createUrl method

Old Yii1 to create an url we write:

$this->createUrl(); 
or
Yii::app()->createUrl();

Now with Yii2 we have to write

\Yii::$app->getUrlManager()->createUrl(['controler/action','param1'=>'value1','param2'=>'value2']);


1 comment: