Update README.md

fix https://github.com/skipperbent/simple-php-router/issues/444
This commit is contained in:
Karel Wintersky
2019-01-28 17:43:11 +03:00
committed by GitHub
parent 153f8630f2
commit cb141314f7

View File

@@ -484,13 +484,13 @@ SimpleRouter::get('/user/{name}', function ($name) {
// ... do stuff
})->where('name', '[A-Za-z]+');
})->where([ 'name' => '[A-Za-z]+' ]);
SimpleRouter::get('/user/{id}', function ($id) {
// ... do stuff
})->where('id', '[0-9]+');
})->where([ 'id' => '[0-9]+' ]);
SimpleRouter::get('/user/{id}/{name}', function ($id, $name) {