PendingSingletonResourceRegistration
class PendingSingletonResourceRegistration
Traits
Properties
| static protected array | $macros | The registered string macros. |
from Macroable |
| protected ResourceRegistrar | $registrar | The resource registrar. |
|
| protected string | $name | The resource name. |
|
| protected string | $controller | The resource controller. |
|
| protected array | $options | The resource options. |
|
| protected bool | $registered | The resource's registration status. |
Methods
Specify that the given route parameters must be alphabetic.
Specify that the given route parameters must be alphanumeric.
Specify that the given route parameters must be numeric.
Specify that the given route parameters must be ULIDs.
Specify that the given route parameters must be UUIDs.
Specify that the given route parameters must be one of the given values.
Apply the given regular expression to the given parameters.
Mix another object into the class.
Dynamically handle calls to the class.
Dynamically handle calls to the class.
Create a new pending singleton resource registration instance.
Set the methods the controller should apply to.
Set the methods the controller should exclude.
Indicate that the resource should have creation and storage routes.
Indicate that the resource should have a deletion route.
Set the route names for controller actions.
Set the route name for a controller action.
Override the route parameter names.
Override a route parameter's name.
Add middleware to the resource routes.
Specify middleware that should be added to the specified resource routes.
Specify middleware that should be removed from the resource routes.
Specify middleware that should be removed from the specified resource routes.
Add "where" constraints to the resource routes.
Register the singleton resource route.
Flush all static state.
Handle the object's destruction.
Details
in
CreatesRegularExpressionRouteConstraints at line 16
CreatesRegularExpressionRouteConstraints
whereAlpha(array|string $parameters)
Specify that the given route parameters must be alphabetic.
in
CreatesRegularExpressionRouteConstraints at line 24
CreatesRegularExpressionRouteConstraints
whereAlphaNumeric(array|string $parameters)
Specify that the given route parameters must be alphanumeric.
in
CreatesRegularExpressionRouteConstraints at line 32
CreatesRegularExpressionRouteConstraints
whereNumber(array|string $parameters)
Specify that the given route parameters must be numeric.
in
CreatesRegularExpressionRouteConstraints at line 40
CreatesRegularExpressionRouteConstraints
whereUlid(array|string $parameters)
Specify that the given route parameters must be ULIDs.
in
CreatesRegularExpressionRouteConstraints at line 48
CreatesRegularExpressionRouteConstraints
whereUuid(array|string $parameters)
Specify that the given route parameters must be UUIDs.
in
CreatesRegularExpressionRouteConstraints at line 56
CreatesRegularExpressionRouteConstraints
whereIn(array|string $parameters, array $values)
Specify that the given route parameters must be one of the given values.
in
CreatesRegularExpressionRouteConstraints at line 69
protected CreatesRegularExpressionRouteConstraints
assignExpressionToParameters(array|string $parameters, string $expression)
Apply the given regular expression to the given parameters.
in
Macroable at line 28
static void
macro(string $name, callable|object $macro)
Register a custom macro.
Boot-only. Macros persist in a static property for the worker lifetime and apply to every subsequent call on the macroable class.
in
Macroable at line 41
static void
mixin(object $mixin, bool $replace = true)
Mix another object into the class.
Boot-only. Delegates to macro() for each method; registered macros persist in a static property for the worker lifetime.
in
Macroable at line 57
static bool
hasMacro(string $name)
Check if macro is registered.
in
Macroable at line 68
static void
flushMacros()
Flush the existing macros.
Boot or tests only. Clears worker-wide macros; concurrent coroutines may resolve different methods depending on timing.
in
Macroable at line 78
static mixed
__callStatic(string $method, array $parameters)
Dynamically handle calls to the class.
in
Macroable at line 103
mixed
__call(string $method, array $parameters)
Dynamically handle calls to the class.
at line 43
__construct(ResourceRegistrar $registrar, string $name, string $controller, array $options)
Create a new pending singleton resource registration instance.
at line 54
PendingSingletonResourceRegistration
only(array|string $methods)
Set the methods the controller should apply to.
at line 64
PendingSingletonResourceRegistration
except(array|string $methods)
Set the methods the controller should exclude.
at line 74
PendingSingletonResourceRegistration
creatable()
Indicate that the resource should have creation and storage routes.
at line 84
PendingSingletonResourceRegistration
destroyable()
Indicate that the resource should have a deletion route.
at line 94
PendingSingletonResourceRegistration
names(array|string $names)
Set the route names for controller actions.
at line 104
PendingSingletonResourceRegistration
name(string $method, string $name)
Set the route name for a controller action.
at line 114
PendingSingletonResourceRegistration
parameters(array|string $parameters)
Override the route parameter names.
at line 124
PendingSingletonResourceRegistration
parameter(string $previous, string $new)
Override a route parameter's name.
at line 134
PendingSingletonResourceRegistration
middleware(mixed $middleware)
Add middleware to the resource routes.
at line 159
PendingSingletonResourceRegistration
middlewareFor(array|string $methods, array|string $middleware)
Specify middleware that should be added to the specified resource routes.
at line 181
PendingSingletonResourceRegistration
withoutMiddleware(array|string $middleware)
Specify middleware that should be removed from the resource routes.
at line 194
PendingSingletonResourceRegistration
withoutMiddlewareFor(array|string $methods, array|string $middleware)
Specify middleware that should be removed from the specified resource routes.
at line 209
PendingSingletonResourceRegistration
where(mixed $wheres)
Add "where" constraints to the resource routes.
at line 219
RouteCollection|null
register()
Register the singleton resource route.
at line 233
static void
flushState()
Flush all static state.
at line 241
__destruct()
Handle the object's destruction.