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

Allow Router as Target #119

Open
m42e opened this issue Sep 22, 2015 · 3 comments
Open

Allow Router as Target #119

m42e opened this issue Sep 22, 2015 · 3 comments
Milestone

Comments

@m42e
Copy link

m42e commented Sep 22, 2015

This is a feature I really miss in Respect/Rest is, to allow subrouters.

Eg. define sub routers:

$blog = new Router;
$blog->get('/', function() {
    return 'This is my Blog';
});

$site = new Router;
$site->get('/', function() {
    return 'This is the main site';
});
$site->get('/contact', function() {
    return 'Contact';
});

And then have a master:

$r3 = new Router;
$r3->get('/blog', $blog);
$r3->get('/site', $site);

If you like the Idea, I may also offer an implementation, but this takes a week or two.

So that /site/contact will result in Contact and /blog will result in This is my Blog

@emestee
Copy link

emestee commented Dec 28, 2015

Seconded, this would be extremely useful.

@Janokapapa
Copy link

it would be awesome

@augustohp augustohp modified the milestone: Ideas May 13, 2016
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

5 participants
@augustohp @emestee @m42e @Janokapapa and others