bramus / router

A lightweight and simple object oriented PHP Router

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mount vars

aminpypc opened this issue · comments

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 ???

commented

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