Question : How can I get current controller and current controller action name in yii2
Answered by : rusik
<?php echo Yii::$app->controller->id; //current controller id ?>
<?php echo Yii::$app->controller->action->id; //current controller action id ?>
Source : https://stackoverflow.com/questions/27796371/how-can-i-get-current-controller-in-yii2 | Last Update : Thu, 02 Jun 22
Question : How can I get current controller in yii2
Answered by : rusik
Yii::$app->controller->id;
Source : https://stackoverflow.com/questions/27796371/how-can-i-get-current-controller-in-yii2 | Last Update : Thu, 02 Jun 22