Allow Router as Target
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start by locating the Router entry point and reviewing how get() targets are dispatched. Implement nested Router targets so /site/contact reaches the site's contact route and /blog reaches the blog root, then add tests covering the example paths.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- PHP
- Stars
- 605
- Forks
- 100
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Respect/Rest
-
Project Status Open
Difficulty 5/5 Over a week Newbie friendliness 10/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 52/100
-
New Roadmap Open
Difficulty 5/5 Over a week Newbie friendliness 15/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 30/100
Similar issues
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Automattic/safe-publish#594 ·
-
HttpClient
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
symfony/symfony-docs#23092 ·
-
sync-en
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
sync-en
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Перевод устарел
Difficulty 2/5 1-3 hours Newbie friendliness 75/100