Laravel\Lumen\Concerns\RoutesRequests::group PHP Method

group() public method

Register a set of routes with a set of shared attributes.
public group ( array $attributes, Closure $callback ) : void
$attributes array
$callback Closure
return void
    public function group(array $attributes, Closure $callback)
    {
        $parentGroupAttributes = $this->groupAttributes;
        if (isset($attributes['middleware']) && is_string($attributes['middleware'])) {
            $attributes['middleware'] = explode('|', $attributes['middleware']);
        }
        $this->groupAttributes = $attributes;
        call_user_func($callback, $this);
        $this->groupAttributes = $parentGroupAttributes;
    }