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

Setting namespace multiple times is not supported. #60

Closed
sn01615 opened this issue Jan 11, 2018 · 2 comments
Closed

Setting namespace multiple times is not supported. #60

sn01615 opened this issue Jan 11, 2018 · 2 comments

Comments

@sn01615
Copy link

sn01615 commented Jan 11, 2018

...
$router->setNamespace('Ncontrollers');
$router->get('/aaa/bbb', 'AController@ccc');
...
$router->setNamespace('Ncontrollers\\Api');
$router->get('/aaa/ddd', 'BController@eee');
...
@hozzaq
Copy link

hozzaq commented Jan 11, 2018

you can do this

$router->get('/aaa/bbb', '\Ncontrollers\AController@ccc');
$router->get('/aaa/ddd', '\Ncontrollers\Api\BController@eee');

@bramus
Copy link
Owner

bramus commented Jan 11, 2018

What @hozzaq said. Evaluation of the defined namespace only happens upon execution of the set callable on the route.

@bramus bramus closed this as completed Jan 11, 2018
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

3 participants