// Matches /user/42, but not /user/xyz
['GET', '/user/{id:\d+}', [\App\services\UserService::class, 'get']]
// Matches /user/foobar, but not /user/foo/bar
['GET', '/user/{name}', [\App\services\UserService::class, 'get']]
// Matches /user/foo/bar as well
['GET', '/user/{name:.+}', [\App\services\UserService::class, 'get']]
Router Middleware
The router supports multiple middlewares. The priority of router middleware is lower than the one of global middleware.