How to get the route from controller/action ?
- Dominant language
- PHP
- Stars
- 1.1k
- Forks
- 236
- PR merge metrics
- No merged PRs in 30d
Description
I want to output a menu and get the links automatically from the router.
```
Home
Contact Us
```
But I don't want to write the url in the html manually.
If I set this:
```
$router->get('/', 'Controller@home');
$router->get('/contact_us', 'Controller@contact');
```
How can I get `/` back from `Controller` class, `index` method?
How can I get `/contact_us` back from `Controller` class, `contact` method?
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue names the router's get() registrations and Controller methods as the entry points. Read the router API around those calls first; done would be a clear answer explaining whether the registered paths can be retrieved, or what documentation change is needed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100