router icon indicating copy to clipboard operation
router copied to clipboard

Unique namespace within a mount

Open milkamil93 opened this issue 4 years ago • 2 comments

Example:

$router->mount('/api/v1', function () use ($router) {
    $router->setNamespace('Source\Api\v1');
    $router->mount('/test', function () use ($router) {
        $router->setNamespace('Source\Api\v1\Test');
    });
});

milkamil93 avatar Aug 05 '21 07:08 milkamil93

LGTM if it works (did not test that yet), but please add some unit tests 😉 that would be icing on the cake 👍🏻

uvulpos avatar Aug 05 '21 20:08 uvulpos

LGTM if it works (did not test that yet), but please add some unit tests 😉 that would be icing on the cake 👍🏻

https://github.com/bramus/router/pull/158/commits/75d5c6e13c836b3a961194ac6f48a794280639b0

milkamil93 avatar Aug 06 '21 07:08 milkamil93