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);
}
}
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