How we can get current controller & action name in Yii?
You can get the current controller name by:
//Controller Name
echo Yii::$app->controller->id;
You can get current action name by:
echo Yii::$app->controller->action->id;
BY Best Interview Question ON 31 Jan 2019