protected function addCookieConsentScriptToResponse(Response $response)
{
$content = $response->getContent();
$closingBodyTagPosition = $this->getLastClosingBodyTagPosition($content);
$content = '' . substr($content, 0, $closingBodyTagPosition) . view('cookieConsent::index')->render() . substr($content, $closingBodyTagPosition);
return $response->setContent($content);
}