src/Http/Responses/ResponseBuilder.php
public function decorator($decorator)
    {
        $decorators = is_array($decorator) ? $decorator : func_get_args();

        foreach ($decorators as $decorator) {
            $this->responseFactory = new $decorator($this->responseFactory);
        };

        return $this;
    }
public function decorator($decorator)
    {
        $decorators = is_array($decorator) ? $decorator : func_get_args();

        foreach ($decorators as $decorator) {
            $this->responseFactory = new $decorator($this->responseFactory);
        };

        return $this;
    }
Decorate the response with the given decorator.

@param  string[]|string $decorator
@return $this