RouteRegistrar (Routing)

RouteRegistrar

class RouteRegistrar (View source)

Methods

void __construct(Router $router)

Create a new route registrar instance.

$this attribute(string $key, mixed $value)

Set the value for a given attribute.

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

Route a resource to a controller.

void group(Closure|string $callback)

Create a route group with shared attributes.

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

Register a new route with the given verbs.

Route|$this __call(string $method, array $parameters)

Dynamically handle calls into the route registrar.

Details

void __construct(Router $router)

Create a new route registrar instance.

Parameters

Router $router

Return Value

void

$this attribute(string $key, mixed $value)

Set the value for a given attribute.

Parameters

string $key
mixed $value

Return Value

$this

Exceptions

InvalidArgumentException

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(Closure|string $callback)

Create a route group with shared attributes.

Parameters

Closure|string $callback

Return Value

void

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

Register a new route with the given verbs.

Parameters

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

Return Value

Route

Route|$this __call(string $method, array $parameters)

Dynamically handle calls into the route registrar.

Parameters

string $method
array $parameters

Return Value

Route|$this

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

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部