new Router()
Creates a new router object and registers all the given routes
new Router(array $routes = [ ], array $hooks = [ ])
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| $routes | array |
[ ]
|
|
| $hooks | array<string, \Closure> |
[ ]
|
Optional beforeEach and afterEach hooks |