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