-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
The use route converter and beforeMatch for Router\Group #1555
Comments
Can you write a simple example? So that we can more clearly your meaning. |
The syntax is the same as for a one specified route, but I want to be able to use $router = new \Phalcon\Mvc\Router();
$route_group = new \Phalcon\Mvc\Router\Group(array(
'namespace' => 'Controllers\GroupNa\\',
'controller' => 'Index'
));
$route_group->setPrefix('/group');
$route_group->addGet('/{entity:[a-z_]+}/{id:[\d]+}', ['action' => 'get']);//->convert('entity', $singularize);
$route_group->addPost('/{entity:[a-z_]+}/?', ['action' => 'post']);//->convert('entity', $singularize);
// other routes
$route_group->convert('entity', $singularize);
$router->mount($route_group); In this case, I use |
I think you can use I'll add support for |
Could you please check now? |
How can I convert parameters using |
Also in the function-argument ($callable) to Example from documentation
I wrote about the problem here but this issue remained unanswered... This error in the documentation or in the code? |
OK, will take a look. |
Fixed in 1.3 |
Its works. Thanks) |
I need to convert the parameter for all routed from one routes group. Maybe there is some kind of workaround. Now I have to duplicate a lot of code. Thanks.
The text was updated successfully, but these errors were encountered: