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

后端 未结 5 1732
误落风尘
误落风尘 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:55

    controller_path holds the path of the controller used to serve the current view. (ie: admin/settings).

    and

    controller_name holds the name of the controller used to serve the current view. (ie: settings).

提交回复
热议问题