计算机网络/计算机科学与应用/系统/运维/开发

Tp5.1 模板引擎



// $this 使用必须继承Controller

return $this->fetch();


// 指定模板  推荐

return $this->fetch('edit');

// 指定目录下的模板

return $this->fetch('public/edit');

// 指定模块下的模板

return $this->fetch('admin@public/edit');

// view_path 下的模板

return $this->fetch('/edit');


// 如果没有继承控制器 可以使用助手函数 view

return view('edit');


你努力了什么,也就成就了什么,与其羡慕别人,不如蜕变自己。

评论

^