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

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

getGeneratedName()

No description

addMiddleware(RouteMiddleware $middleware)

Adds middleware to the route.

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.

Details

bool hasCustomName()

No description

Return Value

bool

mixed getAction()

No description

Return Value

mixed

setAction(mixed $action)

No description

Parameters

mixed $action

mixed getName()

No description

Return Value

mixed

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

Parameters

$name

updateName(mixed $name, Router $router)

No description

Parameters

mixed $name
Router $router

private getGeneratedName()

No description

addMiddleware(RouteMiddleware $middleware)

Adds middleware to the route.

Parameters

RouteMiddleware $middleware

RouteMiddleware[] getMiddlewares()

No description

Return Value

RouteMiddleware[]

setScopes(string $scope)

Explicitly sets an OAuth2 scope to a route. This will be used if the route is consumed in an OAuth2 request.

Parameters

string $scope