public function setMiddleware(array $middleware) { $this->middleware = $this->middleware->withValues($middleware); return $this; }