mrjgreen / phroute

A super fast PHP router, with route parameters, restful controllers, filters and reverse routing.
Other
713 stars 97 forks source link

Possible error to group routes #105

Closed Sleon4 closed 5 months ago

Sleon4 commented 1 year ago

I have grouped routes in such a way that the groups should look like this based on the string that I am writing:

$router->group(['prefix' => 'users'], function($router) {
    $router->group(['prefix' => 'read'], function($router) {
        $router->get('/', fn() => null);
        $router->get('by-id', fn() => null);
    });
});

When obtaining the routes I obtain them in the following way through the library:

Having written a route of the form $router->get('/', fn() => null) you should get a route like 'users/read/' but not a 'users/read' route, this is an error mine?