搜索中心
搜索中心 搜索快照

模块架构 - 模块视图文件

模块视图文件均位于 module/Xxx/View

在Web模块中引用视图

use ModStart\Module\ModuleBaseController;

class XxxController extends ModuleBaseController{
    // ...
    public function index(){
        // 使用 module/View/Xxx/pc/aaa/bbb.blade.php 视图
        return $this->view('aaa.bbb',[
            // ...
        ]);
    }
    // ...
}

在Admin模块中引用视图

use Illuminate\Routing\Controller;

class XxxController extends Controller{
    // ...
    public function index(){
        // 使用 module/View/Xxx/admin/aaa/bbb.blade.php 视图
        return view('module::Xxx.View.admin.aaa.bbb',[
            // ...
        ]);
    }
    // ...
}
查看原文
QQ
微信