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

Nova 3.0 Route groups with empty entry doesn't work. #715

Closed
opessoa opened this issue Apr 10, 2016 · 1 comment
Closed

Nova 3.0 Route groups with empty entry doesn't work. #715

opessoa opened this issue Apr 10, 2016 · 1 comment

Comments

@opessoa
Copy link

opessoa commented Apr 10, 2016

Hi guys.

This is my sample...

Router::group('group', function() {
    Router::any('add', 'App\Controllers\Group\Group@add');

    Router::any('edit/(:num)', 'App\Controllers\Group\Group@edit');

    Router::any('remove/(:num)', 'App\Controllers\Group\Group@remove');

    Router::any('(:num)', 'App\Controllers\Group\Group@group');

    Router::any('', 'App\Controllers\Group\Group@index');

});

To work correctly I need to do this:

Router::group('group', function() {
    Router::any('add', 'App\Controllers\Group\Group@add');

    Router::any('edit/(:num)', 'App\Controllers\Group\Group@edit');

    Router::any('remove/(:num)', 'App\Controllers\Group\Group@remove');

    Router::any('(:num)', 'App\Controllers\Group\Group@group');

});
Router::any('group', 'App\Controllers\Group\Group@index');
@dcblogdev
Copy link

Placing catch routes like (:num) should come last otherwise any routes after those won't be executed

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

2 participants