How to get Current controller and Method

sachin
edited June 2021 in Codeigniter


Tagged:

Best Answer

  • sachin
    Accepted Answer

    To get name of Current Controller

    $this->router->class;
    

    To get name of Method

    $this->router->method;
    


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!