TP6 的多应用路由配置

1、进入项目目录,执行支持多应用扩展

composer require topthink/think-multi-app

2、删除app目下的其他的文件

3、新建多个应用

php think build index
php think build admin
php think build common

4、修改config/app.php文件

// 开启多应用
'auto_multi_app'   => true

5、新建路由文件

app/admin/route/route.php
app/index/route/route.php

修改 app/admin/route/route.php 文件,设置路由
Route::get('test', 'Index/hello');

6、最后访问方式

https://www.xxxx.com/index.php/admin/test
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容