Open
Description
For grouping I use the pattern, but the problem is that everything works only when the url is specified with the language, without the language it gives an error.
These links work
- test.com/eng
- test.com/eng/page
- test.com/eng/admin/page
But these links do not work
- test.com
- test.com/page
- test.com/admin/page
$patterns = array(
':lang' => 'ua|ru|eng|de'
);
$router->pattern($patterns);
$router->group(':lang?', function($router) {
$router->get('/', function() {
return 'Front';
});
$router->get('page', function() {
return 'Front - page';
});
$router->group('admin', function($router) {
$router->get('/', function() {
return 'Admin';
});
$router->get('page', function() {
return 'Admin - page';
});
});
});
How to solve this problem? Thank you in advance.