@php $rendered = view($viewName, $data ?? [])->render(); $text = html_entity_decode(strip_tags(preg_replace('/\s+/', ' ', $rendered)), ENT_QUOTES | ENT_HTML5, 'UTF-8'); $text = trim(preg_replace('/[ \t]{2,}/', ' ', $text)); @endphp {!! $text !!} -- {{ config('company.name') }} {{ config('company.address.line1') }}, {{ config('company.address.line2') }} Phone: {{ config('company.phone') }} ยท Email: {{ config('company.email') }}