@extends('layouts.app') @section('title', 'Preview — '.$template->name) @section('content') @php $lb = '{{'; $rb = '}}'; @endphp

Preview — {{ $template->name }}

Rendered against live data. Unresolved placeholders stay visible so typos are obvious.

Edit All templates

Render against a specific customer

@csrf
The preview uses their latest service and latest invoice.

Rendered output

@if ($rendered['subject'])
{{ $rendered['subject'] }}
@endif
{{ $rendered['body'] }}

Values used

@foreach ($context as $key => $value) @php $used = str_contains((string) $template->body, '{{'.$key.'}}') || str_contains((string) $template->subject, '{{'.$key.'}}'); @endphp @endforeach
PlaceholderValueResolved
{{ $lb.$key.$rb }} {{ $value }} @if ($used) used @else not in template @endif
Any placeholder left as {{ $lb }}…{{ $rb }} in the output is not in this list and will not resolve.
@endsection