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
网友评论