class RouteGroupBuilder (View source)

Properties

protected $router This is the original router, not the temporary router we created for the route group callable.
protected string $prefix A path prefix for all routes.
protected $namespace The ability to set a common namespace for all classes within a group
protected $scope Define one or more scope (comma-delimited) that apply to this route. Used with API routes.
protected RouteMiddleware[] $middlewares
protected $requirements Regular expressions that lock down URL parameters to certain conditions.

Methods

__construct(Router $router)

RouteBuilder constructor.

string
getPrefix()

No description

setPrefix(string $prefix)

No description

scope(string $scope)

No description

buildGroup()

No description

$this
addMiddleware($middleware, $priority = 10)

No description

mixed
getNamespace()

No description

setNamespace(mixed $namespace)

No description

setRequirements(array $requirements)

No description

processPrefix(Route $route)

No description

processRequirements(Route $route)

No description

processNamespace(Route $route)

No description

processMiddlewares(Route $route)

No description

processScope(Route $route)

No description

sendFromGroupToRouter(RouteCollection $routeCollection, Router $router)

No description

routes($routes, $pkgHandle = null)

No description

Details

__construct(Router $router)

RouteBuilder constructor.

Parameters

Router $router

string getPrefix()

Return Value

string

setPrefix(string $prefix)

Parameters

string $prefix

scope(string $scope)

Parameters

string $scope

buildGroup()

$this addMiddleware($middleware, $priority = 10)

Parameters

$middleware
$priority

Return Value

$this

mixed getNamespace()

Return Value

mixed

setNamespace(mixed $namespace)

Parameters

mixed $namespace

setRequirements(array $requirements)

Parameters

array $requirements

protected processPrefix(Route $route)

Parameters

Route $route

protected processRequirements(Route $route)

Parameters

Route $route

protected processNamespace(Route $route)

Parameters

Route $route

protected processMiddlewares(Route $route)

Parameters

Route $route

protected processScope(Route $route)

Parameters

Route $route

protected sendFromGroupToRouter(RouteCollection $routeCollection, Router $router)

Parameters

RouteCollection $routeCollection
Router $router

routes($routes, $pkgHandle = null)

Parameters

$routes
$pkgHandle