protected function getMiddlewareGroup(string $id = Group::DEFAULT_ID): MiddlewareCollection
    {
        if (! isset($this->middleware[$id]) || $this->middleware[$id] instanceof MiddlewareCollection === false) {
            $this->middleware[$id] = $this->middlewareCollection($id);
        }
        return $this->middleware[$id];
    }