RouteRegistrar
class RouteRegistrar (View source)
Traits
Properties
protected Router | $router | The router instance. |
|
protected array | $attributes | The attributes to pass on to the router. |
|
protected string[] | $passthru | The methods to dynamically pass through to the router. |
|
protected string[] | $allowedAttributes | The attributes that can be set through this class. |
|
protected array | $aliases | The attributes that are aliased. |
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.
Set the value for a given attribute.
Route a resource to a controller.
Route an API resource to a controller.
Route a singleton resource to a controller.
Route an API singleton resource to a controller.
Register a new route with the router.
Compile the action into an array including the attributes.
Dynamically handle calls into the route registrar.
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
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
whereIn(array|string $parameters, array $values)
Specify that the given route parameters must be one of the given values.
protected $this
assignExpressionToParameters(array|string $parameters, string $expression)
Apply the given regular expression to the given parameters.
PendingResourceRegistration
resource(string $name, string $controller, array $options = [])
Route a resource to a controller.
PendingResourceRegistration
apiResource(string $name, string $controller, array $options = [])
Route an API resource to a controller.
PendingSingletonResourceRegistration
singleton(string $name, string $controller, array $options = [])
Route a singleton resource to a controller.
PendingSingletonResourceRegistration
apiSingleton(string $name, string $controller, array $options = [])
Route an API singleton resource to a controller.
Route
match(array|string $methods, string $uri, Closure|array|string|null $action = null)
Register a new route with the given verbs.
protected Route
registerRoute(string $method, string $uri, Closure|array|string|null $action = null)
Register a new route with the router.
protected array
compileAction(Closure|array|string|null $action)
Compile the action into an array including the attributes.
Route|$this
__call(string $method, array $parameters)
Dynamically handle calls into the route registrar.