framework
framework copied to clipboard
多应用模式下php think route:list问题
在多应用模式下,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;
故,在多应用模式下,命令执行得不到对应路由表