Skip to content

Kirby 6.0.0

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

Parent class

Kirby\Http\Router