How we can get current controller & action name in yii?
Answer / Sandeep Gautam
To get the current controller and action name in Yii, you can use $this->controller->id and $this->action->id respectively. For example:nn```phpnecho $this->controller->id . ' - ' . $this->action->id;```
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the naming convention in yii framework? Explain
What is the first file that gets loaded when you run a application using yii?
List some database related functions in yii 2 framework?
Why yii framework is faster?
What is active record (ar) in yii framework?
How we can remove index.php from url in yii?
How we can change the url for yii::app()->homeurl in yii2?
What is yii 2? Please explain?
What's new in yii release 2.0?
How to use form validations in yii?
Why yii is so fast?
What are the new features acquired in yii2?