Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

How can I get current controller and current controller action name in yii2

<?php echo Yii::$app->controller->id; //current controller id ?>


<?php echo Yii::$app->controller->action->id; //current controller action id ?>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #How #I #current #controller #current #controller #action
ADD COMMENT
Topic
Name
8+2 =