domain($domain, function () use ($router) { foreach ($this->getRoutes() as $route) { include $route; } }); } else { $router->group(function () use ($router) { foreach ($this->getRoutes() as $route) { include $route; } }); } } /** * * @time 2019年12月15日 * @return array */ protected function getRoutes(): array { $routes = CatchAdmin::getRoutes(); $routes[] = CatchAdmin::directory() . 'login' . DIRECTORY_SEPARATOR . 'route.php'; return $routes; } }