Can I get the name of the current controller in the view?

后端 未结 5 1731
误落风尘
误落风尘 2020-11-29 16:17

Is there a way to figure out what the current controller is from within the view?

For an example of why I would want to know this: if several controllers share the s

5条回答
  •  春和景丽
    2020-11-29 16:52

    controller_name holds the name of the controller used to serve the current view.

提交回复
热议问题