Skip to content
This repository has been archived by the owner on Feb 13, 2022. It is now read-only.

Nested Routes? #809

Open
trollboy opened this issue Nov 14, 2021 · 0 comments
Open

Nested Routes? #809

trollboy opened this issue Nov 14, 2021 · 0 comments

Comments

@trollboy
Copy link
Contributor

Currently working on something where dynamic nested routes or the ability to prepend would come in awfully handy. Example is:

index.php
Route\get('/rest', fn() => RestController\Routes() );
RestController\Routes.php

Class Routes {
       private $prepend='/rest'; 
       public __construct(){
            /** handles routing for /rest/todos **/
            Route\class_name('/todos', TodosController::class);
       }
}       

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants