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 are formatter in yii2?
How we can remove index.php from url in yii?
What is required properties in yii application? Why?
What is the component, uses, how can we do and what is the better way?
Explain the difference between homeurl and baseurl in yii2?
Benifits of yii over other frameworks?
Can you list some database related functions in yii?
What are the naming convention in yii 2.0 framework?
What are the requirements of the yii?
What are yii helpers?
Explain naming convention in yii 2 framework?
What is the component, helper and why are they used, is there other way we can do same thing, what is better?