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

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -