PendingResourceRegistration
class PendingResourceRegistration
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 resource registration instance.
Set the methods the controller should apply to.
Set the methods the controller should exclude.
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.
Indicate that the resource routes should have "shallow" nesting.
Define the callable that should be invoked on a missing model exception.
Indicate that the resource routes should be scoped using the given binding fields.
Define which routes should allow "trashed" models to be retrieved when resolving implicit model bindings.
Register the 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 resource registration instance.
at line 54
PendingResourceRegistration
only(array|string $methods)
Set the methods the controller should apply to.
at line 64
PendingResourceRegistration
except(array|string $methods)
Set the methods the controller should exclude.
at line 74
PendingResourceRegistration
names(array|string $names)
Set the route names for controller actions.
at line 84
PendingResourceRegistration
name(string $method, string $name)
Set the route name for a controller action.
at line 94
PendingResourceRegistration
parameters(array|string $parameters)
Override the route parameter names.
at line 104
PendingResourceRegistration
parameter(string $previous, string $new)
Override a route parameter's name.
at line 114
PendingResourceRegistration
middleware(mixed $middleware)
Add middleware to the resource routes.
at line 139
PendingResourceRegistration
middlewareFor(array|string $methods, array|string $middleware)
Specify middleware that should be added to the specified resource routes.
at line 161
PendingResourceRegistration
withoutMiddleware(array|string $middleware)
Specify middleware that should be removed from the resource routes.
at line 174
PendingResourceRegistration
withoutMiddlewareFor(array|string $methods, array|string $middleware)
Specify middleware that should be removed from the specified resource routes.
at line 189
PendingResourceRegistration
where(mixed $wheres)
Add "where" constraints to the resource routes.
at line 199
PendingResourceRegistration
shallow(bool $shallow = true)
Indicate that the resource routes should have "shallow" nesting.
at line 209
PendingResourceRegistration
missing(callable $callback)
Define the callable that should be invoked on a missing model exception.
at line 219
PendingResourceRegistration
scoped(array $fields = [])
Indicate that the resource routes should be scoped using the given binding fields.
at line 229
PendingResourceRegistration
withTrashed(array $methods = [])
Define which routes should allow "trashed" models to be retrieved when resolving implicit model bindings.
at line 239
RouteCollection|null
register()
Register the resource route.
at line 253
static void
flushState()
Flush all static state.
at line 261
__destruct()
Handle the object's destruction.