Yii2 get controller/action from url -
how in yii2 controller/action url. attention!!! ask yii2. there answers consern yii1 @ forum.
added. find smth yii::app()->geturlmanager()->parseurl('http://eewee.djn')); in yii2
added. refferer url anather conrtoller, want parse url yii2 , controller/action.
try this!
<?php echo yii::$app->controller->id; // controller id ?> <?php echo yii::$app->controller->action->id; // controller action id ?>
Comments
Post a Comment