TP6多应用模式下的视图渲染问题

浏览:5274 发布日期:2019/11/01 分类:ThinkPHP6专区 关键字: TP6 thinkphp6 视图 视图渲染
admin应用下的Index控制器代码:namespace app\admin\controller;

use think\facade\View;

class Index extends BaseController
{
    public function index()
    {
        return view();
    }
}
运行后报错:[0] TemplateNotFoundException in Think.php line 146
模板文件不存在:D:\PhpstormProjects\tp6\app\admin\view\.html
在渲染的时候必须要这么写:return view('index/index');请问有什么办法可以默认打开当前操作对应的视图吗


最佳答案
评论( 相关
后面还有条评论,点击查看>>