我正在使用 zend-expressive (3) 来构建我的 REST API。文件 config/routes.php 包含我的路线,例如
return function (Application $app, MiddlewareFactory $factory, ContainerInterface $container) : void {
$app->get('/', Start\HomePageHandler::class, 'home');
$app->get('/api/ping', Start\PingHandler::class, 'api.ping');
};
每个新模块都会增加很多新路线。这变得令人困惑。有没有办法将路由配置拆分为多个文件?