@extends('pdf._base') @section('title', 'Certificate '.$c->credential_id) @php $completion = in_array(strtolower((string) $c->type), ['course completion', 'completion'], true); $name = $c->user->name; $len = mb_strlen($name); $nameSize = $len > 30 ? 34 : ($len > 22 ? 40 : 46); $course = preg_replace('/\s+—\s+(Certificate of Completion|Certificate)$/u', '', $c->title); $courseSize = mb_strlen($course) > 70 ? 17 : (mb_strlen($course) > 46 ? 20 : 24); $ev = (array) ($c->evidence ?? []); $hours = $ev['hours'] ?? $ev['duration_hours'] ?? $c->course?->total_hours; $pct = $ev['percent'] ?? $c->score; $att = $ev['attendance_percent'] ?? null; $fmt = fn ($v) => rtrim(rtrim(number_format((float) $v, 1), '0'), '.'); $facts = array_filter([ $c->course?->exam_code ? ['Aligned to', $c->course->exam_code] : null, $hours ? ['Training', $fmt($hours).' hours'] : null, $pct !== null ? ['Assessment', $fmt($pct).'%'] : null, $att !== null ? ['Attendance', $fmt($att).'%'] : null, $c->course?->level ? ['Level', $c->course->level] : null, ]); $skills = $c->skills->pluck('name')->take(6); $verifyHost = preg_replace('#^https?://#', '', $c->verifyUrl()); @endphp @section('css') @endsection @section('body') {{-- band --}}
{{ $completion ? 'PROFESSIONAL TRAINING' : 'VERIFIED ACHIEVEMENT' }}
{{ $completion ? 'Certificate of Completion' : 'Certificate of Achievement' }}
@if($badgePng)
DIGITAL BADGE · OPEN BADGES 2.0
@endif
Scan to verify live
{{ $c->credential_id }}
Fingerprint
{{ $c->fingerprint() }}
{{-- paper --}}
Credential ID {{ $c->credential_id }}
Issued {{ $c->issued_at->format('d F Y') }}@if($c->expires_at)
Valid until {{ $c->expires_at->format('d F Y') }}@endif
INFOTICS ACADEMY · KARACHI · ONLINE
This is to certify that
{{ $name }}
has {{ $completion ? 'successfully completed the instructor-led professional training program' : 'passed the proctored certification assessment for' }}
{{ $course }}
@if($facts)
@foreach($facts as [$k, $v])
{{ $k }}{{ $v }}
@endforeach
@endif @if($skills->isNotEmpty())
SKILLS VERIFIED@foreach($skills as $s){{ $s }}@endforeach
@endif
{{ $signatures['left']['script'] }}
{{ $signatures['left']['name'] }}
{{ $signatures['left']['role'] }}
{{ $signatures['right']['script'] }}
{{ $signatures['right']['name'] }}
{{ $signatures['right']['role'] }}
Verify this credential at {{ $verifyHost }}. The fingerprint above must match the verification page; any edit to the name, course or date breaks it. This certificate is issued by INFOTICS Academy and is not an official vendor certification unless stated.
@if($c->revoked_at)
REVOKED
@endif @endsection