class PendingResourceRegistration (View source)

Properties

protected ResourceRegistrar $registrar

The resource registrar.

protected string $name

The resource name.

protected string $controller

The resource controller.

protected array $options

The resource options.

Methods

void
__construct(ResourceRegistrar $registrar, string $name, string $controller, array $options)

Create a new pending resource registration instance.

only(array|string|dynamic $methods)

Set the methods the controller should apply to.

except(array|string|dynamic $methods)

Set the methods the controller should exclude.

names(array|string $names)

Set the route names for controller actions.

name(string $method, string $name)

Set the route name for a controller action.

parameters(array|string $parameters)

Override the route parameter names.

parameter(string $previous, string $new)

Override a route parameter's name.

middleware(mixed $middleware)

Set a middleware to the resource.

void
__destruct()

Handle the object's destruction.

Details

void __construct(ResourceRegistrar $registrar, string $name, string $controller, array $options)

Create a new pending resource registration instance.

Parameters

ResourceRegistrar $registrar
string $name
string $controller
array $options

Return Value

void

PendingResourceRegistration only(array|string|dynamic $methods)

Set the methods the controller should apply to.

Parameters

array|string|dynamic $methods

Return Value

PendingResourceRegistration

PendingResourceRegistration except(array|string|dynamic $methods)

Set the methods the controller should exclude.

Parameters

array|string|dynamic $methods

Return Value

PendingResourceRegistration

PendingResourceRegistration names(array|string $names)

Set the route names for controller actions.

Parameters

array|string $names

Return Value

PendingResourceRegistration

PendingResourceRegistration name(string $method, string $name)

Set the route name for a controller action.

Parameters

string $method
string $name

Return Value

PendingResourceRegistration

PendingResourceRegistration parameters(array|string $parameters)

Override the route parameter names.

Parameters

array|string $parameters

Return Value

PendingResourceRegistration

PendingResourceRegistration parameter(string $previous, string $new)

Override a route parameter's name.

Parameters

string $previous
string $new

Return Value

PendingResourceRegistration

PendingResourceRegistration middleware(mixed $middleware)

Set a middleware to the resource.

Parameters

mixed $middleware

Return Value

PendingResourceRegistration

void __destruct()

Handle the object's destruction.

Return Value

void