{{-- Certificate PDF template, rendered by mPDF inside RenderCertificatePdf. Constraints that shape this file: - mPDF supports a limited CSS subset. No flexbox, no grid, no custom properties. Absolute positioning and tables only. - It must make NO network requests while rendering, so the QR arrives as a data URI and fonts are mPDF's built-ins. - Every value comes from the certificate's SNAPSHOT columns, never from a live join — a later rename must not alter an issued award. --}} @php $fields = $layout['fields'] ?? []; // Background artwork comes from the TEMPLATE row, passed in by the job. $bg = $background ? storage_path('app/public/' . $background) : null; $pos = fn (string $key, string $prop, $default = 0) => $fields[$key][$prop] ?? $default; @endphp
@if ($bg && file_exists($bg)) @else
@endif
Certificate of Completion
This is to certify that
{{ $certificate->issued_to_name }}
has successfully completed
{{ $certificate->course_title }}
Awarded by
{{ $certificate->awarding_body }}
@if ($qr) @endif
Completed
{{ $certificate->completion_date->format('j F Y') }}
@if ($certificate->course_hours) Course length
{{ $certificate->course_hours }} hours @endif
Verify at {{ parse_url(config('app.url'), PHP_URL_HOST) }}/verify
{{ $certificate->verification_code }}