@php $promotionDateFormatted = $promotionDate ? $promotionDate->format('F j, Y') : '—'; $testingDateFormatted = $testingDate ? $testingDate->format('M j, Y') : '—'; $registrationDateFormatted = $registrationDate ? $registrationDate->format('M j, Y') : '—'; $certificateNumber = 'RP-' . str_pad((string) $promotionId, 6, '0', STR_PAD_LEFT); $academyContact = $academyContact ?? []; $website = $academyContact['website'] ?? config('app.url'); $contactParts = collect($academyContact)->except('website')->filter(fn ($value) => filled($value))->values(); $academyInitials = collect(preg_split('/\s+/', trim($academyName)))->filter()->take(2)->map(fn ($word) => mb_strtoupper(mb_substr($word, 0, 1)))->implode(''); $lengthClass = fn ($value, $longAt, $veryLongAt = null) => mb_strlen((string) $value) > ($veryLongAt ?? PHP_INT_MAX) ? ' very-long' : (mb_strlen((string) $value) > $longAt ? ' long' : ''); @endphp
@if($logoPath) @else
{{ $academyInitials ?: 'MA' }}
@endif
{{ $academyName }}
Martial Arts • Karate • Discipline
Rank
Honor
Certificate of Rank Promotion
Official Karate Rank Advancement
This certificate is proudly presented to
{{ $studentName }}
In recognition of dedicated training, discipline, commitment, and demonstrated technical skill, this certificate recognizes the successful completion of the requirements for advancement to the rank shown below.
@if($previousRank)
Previous Rank
{{ $previousRank }}
@else
Rank Advancement
Earned
@endif
{{ $newRank }}
@if($rankStyle)
{{ $rankStyle }}
@endif
Official
Rank
Certification
Promotion Date
{{ $promotionDateFormatted }}
Testing Date
{{ $testingDateFormatted }}
Registered
{{ $registrationDateFormatted }}
Testing Event
{{ $testingEvent ?: '—' }}
Academy / Location
{{ $locationName ?: '—' }}
Instructor
{{ $instructorName ?: '—' }}
Authorized By
{{ $promotedBy ?: '—' }}
{{ $instructorName ?: '—' }}
Instructor
{{ $promotedBy ?: '—' }}
Head Instructor / Authorized Representative