Codxplore.com

Latest news:

New android application Islamic Video has been released. its a free islamic video application for android smartphone. Download now!

How to Call action of other Controller in YII2


When we need to to call another controller function,we can simply use the below code

Yii::$app->runAction('publish/commit',[
                    'r' => 'ws'
]);

write it in Controller A index method and you can get the value of $r  in Controller Publish commit method.

 

 

Tags : Yii2,

Views : 3701

Subscribe Us


Follow Us