PendingResourceRegistration
class PendingResourceRegistration (View source)
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 UUIDs.
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 removed from the 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.
Register the resource route.
Handle the object's destruction.
Details
$this
whereAlpha(array|string $parameters)
Specify that the given route parameters must be alphabetic.
$this
whereAlphaNumeric(array|string $parameters)
Specify that the given route parameters must be alphanumeric.
$this
whereNumber(array|string $parameters)
Specify that the given route parameters must be numeric.
$this
whereUuid(array|string $parameters)
Specify that the given route parameters must be UUIDs.
protected $this
assignExpressionToParameters(array|string $parameters, string $expression)
Apply the given regular expression to the given parameters.
static void
macro(string $name, object|callable $macro)
Register a custom macro.
static void
mixin(object $mixin, bool $replace = true)
Mix another object into the class.
static bool
hasMacro(string $name)
Checks if macro is registered.
static void
flushMacros()
Flush the existing macros.
static mixed
__callStatic(string $method, array $parameters)
Dynamically handle calls to the class.
mixed
__call(string $method, array $parameters)
Dynamically handle calls to the class.
void
__construct(ResourceRegistrar $registrar, string $name, string $controller, array $options)
Create a new pending resource registration instance.
PendingResourceRegistration
only(array|string|dynamic $methods)
Set the methods the controller should apply to.
PendingResourceRegistration
except(array|string|dynamic $methods)
Set the methods the controller should exclude.
PendingResourceRegistration
names(array|string $names)
Set the route names for controller actions.
PendingResourceRegistration
name(string $method, string $name)
Set the route name for a controller action.
PendingResourceRegistration
parameters(array|string $parameters)
Override the route parameter names.
PendingResourceRegistration
parameter(string $previous, string $new)
Override a route parameter's name.
PendingResourceRegistration
middleware(mixed $middleware)
Add middleware to the resource routes.
$this|array
withoutMiddleware(array|string $middleware)
Specify middleware that should be removed from the resource routes.
PendingResourceRegistration
where(mixed $wheres)
Add "where" constraints to the resource routes.
PendingResourceRegistration
shallow(bool $shallow = true)
Indicate that the resource routes should have "shallow" nesting.
$this
missing(callable $callback)
Define the callable that should be invoked on a missing model exception.
PendingResourceRegistration
scoped(array $fields = [])
Indicate that the resource routes should be scoped using the given binding fields.
RouteCollection
register()
Register the resource route.
void
__destruct()
Handle the object's destruction.