public function resolveMiddleware($name)
    {
        if (isset($this->middlewareGroups[$name])) {
            return $this->parseMiddlewareGroup($name);
        }

        return $this->parseMiddleware($name);
    }