@php $logoPath = public_path((string) config('custom.color_header', 'assets/images/pdf/header.png')); $logoBase64 = null; if (is_file($logoPath)) { $mime = mime_content_type($logoPath) ?: 'image/jpeg'; $logoBase64 = 'data:'.$mime.';base64,'.base64_encode(file_get_contents($logoPath)); } if (config('custom.hide_pdf_header')) { $logoBase64 = null; } @endphp