src/Concerns/MakesHttpRequests.php
protected function followRedirects($response)
    {
        while ($response->isRedirect()) {
            $response = $this->get($response->headers->get('Location'));
        }

        $this->followRedirects = false;

        return $response;
    }
protected function followRedirects($response)
    {
        while ($response->isRedirect()) {
            $response = $this->get($response->headers->get('Location'));
        }

        $this->followRedirects = false;

        return $response;
    }
protected function followRedirects ( $ response ) { while ( $ response -> isRedirect ( ) ) { $ response = $ this -> get ( $ response -> headers -> get ( 'Location' ) ) ; } $ this -> followRedirects = false ; return $ response ; }
Follow a redirect chain until a non-redirect is received.

@param  \Illuminate\Http\Response  $response
@return \Illuminate\Http\Response
Follow a redirect chain until a non - redirect is received .