{{-- Repeating page header — set via Mpdf::SetHTMLHeader() so EVERY page of the invoice carries the company identity, not just page 1. Identity ONLY (logo + name): the full address/phone/email block lives in the body's "Bill From" box — printing it here too showed the whole address twice on page 1. NOTE: mPDF applies the document's stylesheet to header/footer HTML too, so every cell must explicitly kill the body's global `td { border: 1px }` rule. --}} @php // Settings logo — resolved against BOTH the public/storage symlink and the // real storage disk path, because shared hosts don't reliably support the // symlink (same reason PdfController::storeOrderReceipt writes to public/). $logo = $settings['logo'] ?? null; $logoPath = null; if ($logo) { $relative = ltrim(str_replace('\\', '/', $logo), '/'); $candidates = [ public_path($relative), storage_path('app/public/' . preg_replace('#^storage/#', '', $relative)), public_path('storage/' . $relative), ]; foreach ($candidates as $candidate) { if (file_exists($candidate)) { $logoPath = $candidate; break; } } } $logoPath = $logoPath ?: public_path('backend/template/images/logo/sm-header-logo.svg'); @endphp
|
|
{{ $invoice['company_name'] }} |