interface Registrar (View source)

Methods

void
get(string $uri, Closure|array|string $action)

Register a new GET route with the router.

void
post(string $uri, Closure|array|string $action)

Register a new POST route with the router.

void
put(string $uri, Closure|array|string $action)

Register a new PUT route with the router.

void
delete(string $uri, Closure|array|string $action)

Register a new DELETE route with the router.

void
patch(string $uri, Closure|array|string $action)

Register a new PATCH route with the router.

void
options(string $uri, Closure|array|string $action)

Register a new OPTIONS route with the router.

void
match(array|string $methods, string $uri, Closure|array|string $action)

Register a new route with the given verbs.

void
resource(string $name, string $controller, array $options = array())

Route a resource to a controller.

void
group(array $attributes, Closure $callback)

Create a route group with shared attributes.

void
before(string|callable $callback)

Register a new "before" filter with the router.

void
after(string|callable $callback)

Register a new "after" filter with the router.

void
filter(string $name, string|callable $callback)

Register a new filter with the router.

Details

void get(string $uri, Closure|array|string $action)

Register a new GET route with the router.

Parameters

string $uri
Closure|array|string $action

Return Value

void

void post(string $uri, Closure|array|string $action)

Register a new POST route with the router.

Parameters

string $uri
Closure|array|string $action

Return Value

void

void put(string $uri, Closure|array|string $action)

Register a new PUT route with the router.

Parameters

string $uri
Closure|array|string $action

Return Value

void

void delete(string $uri, Closure|array|string $action)

Register a new DELETE route with the router.

Parameters

string $uri
Closure|array|string $action

Return Value

void

void patch(string $uri, Closure|array|string $action)

Register a new PATCH route with the router.

Parameters

string $uri
Closure|array|string $action

Return Value

void

void options(string $uri, Closure|array|string $action)

Register a new OPTIONS route with the router.

Parameters

string $uri
Closure|array|string $action

Return Value

void

void match(array|string $methods, string $uri, Closure|array|string $action)

Register a new route with the given verbs.

Parameters

array|string $methods
string $uri
Closure|array|string $action

Return Value

void

void resource(string $name, string $controller, array $options = array())

Route a resource to a controller.

Parameters

string $name
string $controller
array $options

Return Value

void

void group(array $attributes, Closure $callback)

Create a route group with shared attributes.

Parameters

array $attributes
Closure $callback

Return Value

void

void before(string|callable $callback)

Register a new "before" filter with the router.

Parameters

string|callable $callback

Return Value

void

void after(string|callable $callback)

Register a new "after" filter with the router.

Parameters

string|callable $callback

Return Value

void

void filter(string $name, string|callable $callback)

Register a new filter with the router.

Parameters

string $name
string|callable $callback

Return Value

void