W3cubDocs

/Laravel 5.8

Registrar

interface Registrar (View source)

Methods

Route get(string $uri, Closure|array|string|callable $action)

Register a new GET route with the router.

Route post(string $uri, Closure|array|string|callable $action)

Register a new POST route with the router.

Route put(string $uri, Closure|array|string|callable $action)

Register a new PUT route with the router.

Route delete(string $uri, Closure|array|string|callable $action)

Register a new DELETE route with the router.

Route patch(string $uri, Closure|array|string|callable $action)

Register a new PATCH route with the router.

Route options(string $uri, Closure|array|string|callable $action)

Register a new OPTIONS route with the router.

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

Register a new route with the given verbs.

PendingResourceRegistration resource(string $name, string $controller, array $options = [])

Route a resource to a controller.

void group(array $attributes, Closure|string $routes)

Create a route group with shared attributes.

Route substituteBindings(Route $route)

Substitute the route bindings onto the route.

void substituteImplicitBindings(Route $route)

Substitute the implicit Eloquent model bindings for the route.

Details

Route get(string $uri, Closure|array|string|callable $action)

Register a new GET route with the router.

Parameters

string $uri
Closure|array|string|callable $action

Return Value

Route

Route post(string $uri, Closure|array|string|callable $action)

Register a new POST route with the router.

Parameters

string $uri
Closure|array|string|callable $action

Return Value

Route

Route put(string $uri, Closure|array|string|callable $action)

Register a new PUT route with the router.

Parameters

string $uri
Closure|array|string|callable $action

Return Value

Route

Route delete(string $uri, Closure|array|string|callable $action)

Register a new DELETE route with the router.

Parameters

string $uri
Closure|array|string|callable $action

Return Value

Route

Route patch(string $uri, Closure|array|string|callable $action)

Register a new PATCH route with the router.

Parameters

string $uri
Closure|array|string|callable $action

Return Value

Route

Route options(string $uri, Closure|array|string|callable $action)

Register a new OPTIONS route with the router.

Parameters

string $uri
Closure|array|string|callable $action

Return Value

Route

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

Register a new route with the given verbs.

Parameters

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

Return Value

Route

PendingResourceRegistration resource(string $name, string $controller, array $options = [])

Route a resource to a controller.

Parameters

string $name
string $controller
array $options

Return Value

PendingResourceRegistration

void group(array $attributes, Closure|string $routes)

Create a route group with shared attributes.

Parameters

array $attributes
Closure|string $routes

Return Value

void

Route substituteBindings(Route $route)

Substitute the route bindings onto the route.

Parameters

Route $route

Return Value

Route

void substituteImplicitBindings(Route $route)

Substitute the implicit Eloquent model bindings for the route.

Parameters

Route $route

Return Value

void

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.8/Illuminate/Contracts/Routing/Registrar.html