@php $logoData = null; $logoMime = null; if (file_exists(public_path('assets/images/logo.png'))) { $logoData = base64_encode(file_get_contents(public_path('assets/images/logo.png'))); $logoMime = 'image/png'; } elseif (file_exists(public_path('assets/images/logo.jpg'))) { $logoData = base64_encode(file_get_contents(public_path('assets/images/logo.jpg'))); $logoMime = 'image/jpeg'; } elseif (file_exists(public_path('assets/images/logo.svg'))) { $logoData = base64_encode(file_get_contents(public_path('assets/images/logo.svg'))); $logoMime = 'image/svg+xml'; } @endphp @if($logoData) @endif

Republic of the Philippines

Province of [Province Name]

Municipality of [Municipality Name]

BARANGAY [BARANGAY NAME]

Office of the Barangay Captain

{{ $clearanceRequest->clearanceType->name ?? 'BARANGAY CLEARANCE' }}

TO WHOM IT MAY CONCERN:

This is to certify that {{ $clearanceRequest->resident ? $clearanceRequest->resident->first_name . ' ' . ($clearanceRequest->resident->middle_name ? $clearanceRequest->resident->middle_name . ' ' : '') . $clearanceRequest->resident->last_name : $clearanceRequest->applicant_name }}, @if($clearanceRequest->resident && $clearanceRequest->resident->household) a resident of {{ $clearanceRequest->resident->household->address ?? 'this barangay' }}, @else a resident of this barangay, @endif is known to me to be a person of good moral character and has no pending case/s or complaint/s filed against him/her in this office.

@if($clearanceRequest->purpose)

This clearance is issued upon the request of the above-named person for {{ $clearanceRequest->purpose }}.

@endif

Issued this {{ \Carbon\Carbon::parse($clearanceRequest->released_date ?? $clearanceRequest->request_date)->format('jS') }} day of {{ \Carbon\Carbon::parse($clearanceRequest->released_date ?? $clearanceRequest->request_date)->format('F Y') }} at Barangay [Barangay Name], [Municipality Name], [Province Name].

{{ $barangayCaptain->full_name ?? '[BARANGAY CAPTAIN NAME]' }}
Barangay Captain
Control No: {{ $clearanceRequest->control_no }}