@php $templateContent = view($templateView, ['payment' => $payment])->render(); preg_match_all('/]*>(.*?)<\/style>/is', $templateContent, $styleMatches); $styles = !empty($styleMatches[1]) ? '' : ''; $bodyContent = $templateContent; if (preg_match('/]*>(.*?)<\/body>/is', $templateContent, $bodyMatches)) { $bodyContent = $bodyMatches[1]; } $bodyContent = preg_replace('/]*>(.*?)<\/script>/is', '', $bodyContent); @endphp {!! $styles !!}
Payment receipt
{!! $bodyContent !!}