framework icon indicating copy to clipboard operation
framework copied to clipboard

多应用模式下php think route:list问题

Open zcpin opened this issue 2 years ago • 0 comments

在多应用模式下,routePath被改成了应用下的route目录,如下代码:

vendor/topthink/think-multi-app/src/MultiApp.php 82行

return $this->app->getAppPath() . 'route' . DIRECTORY_SEPARATOR; 而在命令执行时,还是取得项目根目录下的route目录,如下代码:

vendor/topthink/framework/src/think/console/command/RouteList.php 63行

$path = $this->app->getRootPath() . 'route' . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR; 故,在多应用模式下,命令执行得不到对应路由表

zcpin avatar Jun 26 '23 08:06 zcpin