@php function getBase64OrUrl($imagePath) { if (filter_var($imagePath, FILTER_VALIDATE_URL)) { // Remote URL (e.g., S3) return $imagePath; } $fullPath = public_path($imagePath); if (file_exists($fullPath)) { $imageType = pathinfo($fullPath, PATHINFO_EXTENSION); $imageData = base64_encode(file_get_contents($fullPath)); return 'data:image/' . $imageType . ';base64,' . $imageData; } return ''; // fallback (or set to placeholder image if desired) } @endphp
{{-- REPORT HEADER (Full width header image) --}} @if (!empty($hospital->REPORT_HEADER))
Report Header
@elseif (!empty($profile->REPORT_HEADER))
Report Header
@else {{-- Fallback to individual logos if no REPORT_HEADER --}}
{{-- LEFT LOGO --}} @php $leftLogo = $hospital->REPORT_LEFT_LOGO ?? $profile->LEFT_LOGO ?? null; @endphp @if($leftLogo)
@endif {{-- MID LOGO --}} @php $midLogo = $hospital->REPORT_MID_LOGO ?? $profile->LOGO ?? null; @endphp @if($midLogo)
@endif {{-- RIGHT LOGO --}} @php $rightLogo = $hospital->REPORT_RIGHT_LOGO ?? $profile->RIGHT_LOGO ?? null; @endphp @if($rightLogo)
@endif
@endif
Lab:
{{ $hospital->NAME_EN ?? 'Hospital Name' }}
User:
{{ $endUser->FULL_NAME ?? '-' }}
Branch:
{{ $hospital->BRANCH_NAME ?? $hospital->NAME_EN ?? 'Branch Name' }}
Quotation Type:
@if(isset($packages->first()->TYPE_TITLE)) {{ $packages->first()->TYPE_TITLE }} @else Standard @endif
Tests Count:
{{ $packages_count }} Test(s)
Date:
{{ $date }}
QUOTATION