How to Get Current Controller and Method Name in CodeIgniter
In this tutorial,we see how to get current controller and method name in Codeigniter application.
In some cases we need to get current controller name or current method name.
It can do it simply by using $this->route variable of codeigniter.
Fetch Current Class Name In Codeigniter
Use fetch_class() method to get the name of the controller or class in CodeIgniter.
Fetch Current Method Name In Codeigniter
Use fetch_method() method to get the name of the method or function in CodeIgniter.