Update uri tokenizing to accept \w and \-

This commit is contained in:
Skylear 2021-07-15 15:42:16 -05:00
parent 80a4769308
commit ece7e35959

View File

@ -50,7 +50,7 @@ class Router
private static function tokenize(string $uri) private static function tokenize(string $uri)
{ {
return preg_replace('/(?:{([A-Za-z]+)})+/', '([\w]+)', $uri); return preg_replace('/(?:{([\w\-]+)})+/', '([\w\-]+)', $uri);
} }
public static function run(string $basePath = '', bool $multimatch = false) public static function run(string $basePath = '', bool $multimatch = false)