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(string|object $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()

No description

Return Value

string

setPrefix(string $prefix)

No description

Parameters

string $prefix

scope(string $scope)

No description

Parameters

string $scope

buildGroup()

No description

$this addMiddleware(string|object $middleware, $priority = 10)

No description

Parameters

string|object $middleware
$priority

Return Value

$this

mixed getNamespace()

No description

Return Value

mixed

setNamespace(mixed $namespace)

No description

Parameters

mixed $namespace

setRequirements(array $requirements)

No description

Parameters

array $requirements

protected processPrefix(Route $route)

No description

Parameters

Route $route

protected processRequirements(Route $route)

No description

Parameters

Route $route

protected processNamespace(Route $route)

No description

Parameters

Route $route

protected processMiddlewares(Route $route)

No description

Parameters

Route $route

protected processScope(Route $route)

No description

Parameters

Route $route

protected sendFromGroupToRouter(RouteCollection $routeCollection, Router $router)

No description

Parameters

RouteCollection $routeCollection
Router $router

routes($routes, $pkgHandle = null)

No description

Parameters

$routes
$pkgHandle