Route
class Route extends Route (View source)
Properties
protected string | $customName | If this route has a custom name, it appears here. Otherwise it is automatically generated from the path. |
|
protected mixed | $action | The action that the route will execute when it is run. |
|
protected RouteMiddleware[] | $middlewares |
Methods
No description
No description
No description
No description
Sets the custom name. Note: if the route has already been added to the route collection you will want to use $route->updateName($name, $router) instead
No description
No description
Explicitly sets an OAuth2 scope to a route. This will be used if the route is consumed in an OAuth2 request.
Details
bool
hasCustomName()
No description
mixed
getAction()
No description
setAction(mixed $action)
No description
mixed
getName()
No description
setCustomName($name)
Sets the custom name. Note: if the route has already been added to the route collection you will want to use $route->updateName($name, $router) instead
updateName(mixed $name, Router $router)
No description
private
getGeneratedName()
No description
addMiddleware(RouteMiddleware $middleware)
Adds middleware to the route.
RouteMiddleware[]
getMiddlewares()
No description
setScopes(string $scope)
Explicitly sets an OAuth2 scope to a route. This will be used if the route is consumed in an OAuth2 request.