Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Вопрос #6

Open
eshimischi opened this issue Dec 23, 2024 · 0 comments
Open

Вопрос #6

eshimischi opened this issue Dec 23, 2024 · 0 comments

Comments

@eshimischi
Copy link

eshimischi commented Dec 23, 2024

Битрикс роутер умеет делать вот так https://dev.1c-bitrix.ru/learning/course/index.php?COURSE_ID=43&LESSON_ID=13768&LESSON_PATH=3913.3516.5062.13764.13768

Определять группы роутеров, задавать prefix и тд

$routes->group(function (RoutingConfigurator $routes) {
        $routes->get('/path1, function () {});
        $routes->get('/path2, function () {});
        $routes->get('/path3, function () {});
});

можно добавить в документацию к вашему модулю каким образом это можно реализовать ? К примеру у меня 20 векторов REST API, под каждый делать свой отдельный контроллер ну такое себе. Все что нужно например сделать вот так

$routes->prefix('about')->group(function (RoutingConfigurator $routes) {
        $routes->get('company', [AboutController::class, 'company']);
        $routes->get('personal', [AboutController::class, 'personal']);
        $routes->get('contact', [AboutController::class, 'contact']);
}); 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant