bramus / router

A lightweight and simple object oriented PHP Router
MIT License
1.09k stars 245 forks source link

mount vars #178

Open aminpypc opened 2 years ago

aminpypc commented 2 years ago

success:

$router->mount('/video', function () use ($router) {
    $router->get('/([\w_\d]+)', function ($id) {
        echo 'video '.$id;
    });
});

error:

$router->mount('/video/([\w_\d]+)', function ($id) use ($router) {
    $router->get('/', function () use ($id) {
        echo 'video '.$id;
    });
});

why ???

aolko commented 1 year ago

exactly, @bramus, will there be a fix for that?