Mode: Print Mode
@php $cards = $cards ?? []; @endphp @foreach($cards as $idx => $c) @php $reg = $c['reg'] ?? null; $student = $reg?->student; $group = $reg?->group; $session = $reg?->session; $examClass = $c['exam_class'] ?? 'nine'; $examType = match($examClass) { 'six' => 'PEC', 'eight' => 'JSC', 'nine' => 'SSC', 'eleven' => 'HSC', default => 'Board Registration' }; $examFullName = match($examClass) { 'six' => 'Primary Education Completion', 'eight' => 'Junior School Certificate', 'nine' => 'Secondary School Certificate', 'eleven' => 'Higher Secondary Certificate', default => 'Board Registration' }; $item = $c['item'] ?? null; $subjects = is_array($c['subjects'] ?? null) ? $c['subjects'] : []; $caSubjects = is_array($c['ca_subjects'] ?? null) ? $c['ca_subjects'] : []; $total = count($subjects); $mid = (int)ceil($total / 2); $left = array_slice($subjects, 0, $mid); $right = array_slice($subjects, $mid); $logoPath = $school?->school_logo ? asset('storage/' . $school->school_logo) : ''; $photoPath = $student?->student_photo ? asset('storage/' . $student->student_photo) : ''; $principalName = $school?->principal_name ?? 'Principal'; $schoolName = $school?->school_name ?? 'SMART SCHOOL'; $principalSigPath = $school?->principal_signature ? asset('storage/' . $school->principal_signature) : ''; $dupStyle = $c['dup_style'] ?? 'ssc'; $dup = $item?->duplicate_row_data ?? null; if (is_string($dup)) $dup = json_decode($dup, true); $dupRaw = is_array($dup) ? ($dup['raw_text'] ?? '') : ''; @endphp

{{ $school?->school_name ?? 'SCHOOL NAME' }}

{{ $examFullName }} ({{ $examType }}) - Board Registration Form
Session: {{ $session?->name ?? '' }}
Photo
eSIF SL.No: {{ $idx + 1 }}
Student's Name: {{ $student?->student_name_english ?? '' }}
Father's Name: {{ $student?->father_name_english ?? '' }}
Mother's Name: {{ $student?->mother_name_english ?? '' }}
Gender: {{ $student?->gender ?? '' }}
Date of Birth: {{ $student?->birth_date ? \Carbon\Carbon::parse($student->birth_date)->format('d-m-Y') : '' }}
Religion: {{ $student?->religion ?? '' }}
Class Roll: {{ $item?->class_roll ?? $reg?->class_roll ?? '' }}
Shift: {{ $item?->shift ?? '' }}
Section: {{ $item?->section ?? '' }}
Version: {{ $item?->version ?? $student?->version ?? '' }}
Group: {{ $group?->name ?? '' }}

JSC Roll: {{ $item?->previous_board_roll ?? '' }}
JSC Reg: {{ $item?->previous_board_reg_no ?? '' }}
Subject Code and Name
@php $rows = max(count($left), count($right)); @endphp @if($rows === 0) @else @for($r=0; $r<$rows; $r++) @endfor @endif
Code - Name Code - Name
No subject found
@if(isset($left[$r])) {{ $left[$r]['code'] ?? '' }} - {{ $left[$r]['name'] ?? '' }} @endif @if(isset($right[$r])) {{ $right[$r]['code'] ?? '' }} - {{ $right[$r]['name'] ?? '' }} @endif
@if(!empty($caSubjects))
C.A. Subjects
@foreach($caSubjects as $ca) @endforeach
Code - Name
{{ $ca['code'] ?? '' }} - {{ $ca['name'] ?? '' }}
@endif @if(!empty($dupRaw))
*Board information.
@include('admin.board_registration.print.partials.duplicate_header', ['style' => $dupStyle]) @include('admin.board_registration.print.partials.duplicate_row', [ 'style' => $dupStyle, 'idx' => $idx, 'item' => $item, 'student' => $student, 'session' => $session, 'group' => $group, 'subjects' => $subjects ])
*All of the above information is correct.
@endif
Student Signature
@if($principalSigPath) Signature @endif
{{ $principalName }}
Principal
{{ $schoolName }}
@endforeach