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)

RouteGroupBuilder constructor.

string
getPrefix()

No description

$this
setPrefix(string $prefix)

No description

$this
scope(string $scope)

No description

buildGroup()

No description

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

No description

mixed
getNamespace()

No description

$this
setNamespace(mixed $namespace)

No description

$this
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

$this
routes($routes, null $pkgHandle = null)

No description

Details

__construct(Router $router)

RouteGroupBuilder constructor.

Parameters

Router $router

string getPrefix()

No description

Return Value

string

$this setPrefix(string $prefix)

No description

Parameters

string $prefix

Return Value

$this

$this scope(string $scope)

No description

Parameters

string $scope

Return Value

$this

buildGroup()

No description

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

No description

Parameters

string|object $middleware
int $priority

Return Value

$this

mixed getNamespace()

No description

Return Value

mixed

$this setNamespace(mixed $namespace)

No description

Parameters

mixed $namespace

Return Value

$this

$this setRequirements(array $requirements)

No description

Parameters

array $requirements

Return Value

$this

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

$this routes($routes, null $pkgHandle = null)

No description

Parameters

$routes
null $pkgHandle

Return Value

$this