protected function isAnHtmlResponse(Response $response)
    {
        $type = $response->headers->get('Content-Type');

        return strtolower(strtok($type, ';')) === 'text/html';
    }
protected function isAnHtmlResponse(Response $response)
    {
        $type = $response->headers->get('Content-Type');

        return strtolower(strtok($type, ';')) === 'text/html';
    }
protected function isAnHtmlResponse ( Response $ response ) { $ type = $ response -> headers -> get ( 'Content-Type' ) ; return strtolower ( strtok ( $ type , ';' ) ) === 'text/html' ; }
Check if the content type header is html.

@param \Illuminate\Http\Response $response

@return bool
Check if the content type header is html .