美文网首页
TP6 的多应用路由配置

TP6 的多应用路由配置

作者: 我一直都在 | 来源:发表于2021-03-24 22:05 被阅读0次

    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
    

    相关文章

      网友评论

          本文标题:TP6 的多应用路由配置

          本文链接:https://www.haomeiwen.com/subject/wrrkhltx.html