1.

How we can get current controller & action name in Yii?

Answer»

You can get the current CONTROLLER NAME by:
//Controller Name
ECHO YII::$app->controller->id;

You can get current action name by:
echo Yii::$app->controller->action->id;



Discussion

No Comment Found