@php $school = $student->school; $major = $student->major; $dob = $student->birth_date ? $student->birth_date->format('d M Y') : '-'; $photoUrl = $student->photo_path ? asset('storage/' . $student->photo_path) : null; $initials = collect(explode(' ', $student->full_name))->filter()->map(fn ($p) => strtoupper(substr($p, 0, 1)))->take(2)->implode(''); @endphp Validasi Kartu Pelajar - {{ $student->full_name }}
Validasi Kartu Pelajar
{{ $student->full_name }}
{{ $school->name ?? 'Nama Sekolah' }}
Data kartu valid
@if($photoUrl) Foto {{ $student->full_name }} @else
{{ $initials ?: 'PF' }}
@endif
NIS: {{ $student->nis ?: '-' }}
NISN: {{ $student->nisn ?: '-' }}
Kelas / Jurusan {{ $student->class_name ?: '-' }} • {{ $major->name ?? '-' }}
TTL {{ $student->birth_place ?: '-' }}, {{ $dob }}
Agama {{ $student->religion ?: '-' }}
Sekolah {{ $school->name ?? '-' }}
Alamat Sekolah {{ $school?->address ?? '-' }}