dragonlhp / think-layer-multi-app

thinkphp6 multi app support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

think-layer-multi-app

用于ThinkPHP6+的多应用支持

安装

composer require dragonlhp/think-layer-multi-app

使用

用法参考ThinkPHP6完全开发手册多应用模式章节。 思路是把入口文件的名称与控制器层(controller_layer)目录对应,然后将pathinfo的第一个路径作为应用的名称。相当于是把两个错位后达到的效果! 修改后的访问方式改为:

访问  http://serverName/index.php/index/index/index 指向的是 index应用下面controller的index控制器index方法

访问  http://serverName/admin.php/index/index/index 指向的是 index应用下面admin的index控制器index方法

访问  http://serverName/api.php/index/index/index 指向的是 index应用下面api的index控制器index方法

About

thinkphp6 multi app support

License:Apache License 2.0


Languages

Language:PHP 100.0%