ResourceRegistrar (Routing)

ResourceRegistrar

class ResourceRegistrar (View source)

Methods

void __construct(Router $router)

Create a new resource registrar instance.

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

Route a resource to a controller.

string getResourceUri(string $resource)

Get the base resource URI for a given resource.

string getResourceWildcard(string $value)

Format a resource parameter for usage.

static void singularParameters(bool $singular = true)

Set or unset the unmapped global parameters to singular.

static array getParameters()

Get the global parameter map.

static void setParameters(array $parameters = array())

Set the global parameter mapping.

static array verbs(array $verbs = array())

Get or set the action verbs used in the resource URIs.

Details

void __construct(Router $router)

Create a new resource registrar instance.

Parameters

Router $router

Return Value

void

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

Route a resource to a controller.

Parameters

string $name
string $controller
array $options

Return Value

void

string getResourceUri(string $resource)

Get the base resource URI for a given resource.

Parameters

string $resource

Return Value

string

string getResourceWildcard(string $value)

Format a resource parameter for usage.

Parameters

string $value

Return Value

string

static void singularParameters(bool $singular = true)

Set or unset the unmapped global parameters to singular.

Parameters

bool $singular

Return Value

void

static array getParameters()

Get the global parameter map.

Return Value

array

static void setParameters(array $parameters = array())

Set the global parameter mapping.

Parameters

array $parameters

Return Value

void

static array verbs(array $verbs = array())

Get or set the action verbs used in the resource URIs.

Parameters

array $verbs

Return Value

array

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

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部