dsstjqsr631426 2016-12-14 17:13
浏览 7

Laravel从帮助者设置视图

I have a simple helper (/app/Helpers/Helper.php). Is is possible to set a view from helper's function? Something like return View::make('admin.users', $page_params);

How can I do that?

Notice: this function called in controller's __construct

public function __construct()
{
   set_view();
}
  • 写回答

1条回答 默认 最新

  • dongxianshuai8927 2016-12-14 18:38
    关注

    You can use the view helper for that.

    return view('auth.login');
    
    评论

报告相同问题?