protected function prependMiddleware($middleware, string $key = "", string $group = null)
    {
        $middleware = $this->middlewareResolver()->resolveOrFail($middleware, $key);
        $this->getMiddlewareGroup($group ?: $this->middlewareGroupId)->prepend($middleware, $key);
        return $this;
    }