In View, I can get action by using
$this->action
But, I cannot get controller name by
$this->controller
To get the current controller, Try this :$this->params['controller']
To get the current action, Try this :$this->params['action']
.
I am using cakephp 3.2
$this->params['controller'] - It is not working, showing error message as bellow..
"Missing Helper"
Following code is working properly in cakephp 3.2
$this->request->params['controller'] - Working