src/Http/Response.php
public static function makeFromExisting(IlluminateResponse $old)
    {
        $new = static::create($old->getOriginalContent(), $old->getStatusCode());

        $new->headers = $old->headers;

        return $new;
    }
public static function makeFromExisting(IlluminateResponse $old)
    {
        $new = static::create($old->getOriginalContent(), $old->getStatusCode());

        $new->headers = $old->headers;

        return $new;
    }
public static function makeFromExisting ( IlluminateResponse $ old ) { $ new = static :: create ( $ old -> getOriginalContent ( ) , $ old -> getStatusCode ( ) ) ; $ new -> headers = $ old -> headers ; return $ new ; }
Make an API response from an existing Illuminate response.

@param \Illuminate\Http\Response $old

@return \Dingo\Api\Http\Response
Make an API response from an existing Illuminate response .