修改路由加载

This commit is contained in:
wuyanwen 2019-12-14 18:21:29 +08:00
parent d21126882b
commit 34d75c3f46

View File

@ -19,7 +19,19 @@ class LoadModuleRoutes
$router = app(Route::class); $router = app(Route::class);
$router->group(function () use ($router) { $router->group(function () use ($router) {
include CatchAdmin::getRoutes(); foreach ($this->getRoutes() as $route) {
include $route;
}
}); });
} }
protected function getRoutes()
{
return [
CatchAdmin::directory() . 'login' . DIRECTORY_SEPARATOR . 'route.php',
CatchAdmin::getRoutes(),
];
}
} }