@php function getPronoun($gender, $type, $startOfSentence = true): string { $pronoun = ''; if ($type === 'subject') { $pronoun = $gender == 'male' ? 'He' : 'She'; } else if ($type === 'possessive') { $pronoun = $gender == 'male' ? 'His' : 'Her'; }elseif ($type === 'child') { $pronoun = $gender == 'male' ? 'son' : 'daughter'; } return $startOfSentence ? $pronoun : strtolower($pronoun); } if ($companyType === 'UNV'){ $principalLabel = 'Chancellor'; }elseif ($companyType === 'SCL'){ $principalLabel = 'Headmaster'; }else{ $principalLabel = 'Principal'; } function isMozilla(): bool { $userAgent = $_SERVER['HTTP_USER_AGENT']; return str_contains($userAgent, 'Firefox'); } function getOrdinalSuffix(int $num): string { if ($num > 3 && $num < 21) { return 'th' ; } switch ($num % 10) { case 1: return 'st' ; case 2: return 'nd' ; case 3: return 'rd' ; default: return 'th' ; } } $logoImage='' ; if ($studentTransferCertificateFormate->is_visible_logo_image == 1) { $logoImageUrl = asset('images/eims/setting/design_student_transfer_certificate/logo_image/' . $studentTransferCertificateFormate->logo_image); $logoImage = "background-image: url('$logoImageUrl');"; }else{ $logoImageUrl = asset('images/company/' . $company->image); $logoImage = "background-image: url('$logoImageUrl');"; } @endphp Transfer Certificate @foreach($students as $student)
School Code: {{$company->companyCode}}
EIIN: 107971

{{$company->name}}

{{$company->address}}

Tel: {{$company->telephone}}
e-mail: {{$company->email}}
web: {{$company->website}}
Serial: 252
Date: {{ now()->format('d/m/Y') }}
Transfer Certificate
@php $sessions = $student->eims_session; $last_session = $student->eims_session ? $student->eims_session : null; $results = $student->eims_academic_exam_result; $last_result = $results->isNotEmpty() ? $results->last() : null; $promotions = $student->eims_student_promotion; $last_promotion = $promotions->isNotEmpty() ? $promotions->last() : null; @endphp

This is to certify that {{$student->name}} Son of {{ $student->eims_student?->eims_student_information->father_name ?? ' ' }} (Father) and {{ $student->eims_student?->eims_student_information->mother_name ?? ' ' }} (Mother), residing in District {{$student->eims_student?->eims_student_information->permanent_dist ?? ' ' }} Upazila {{$student->eims_student?->eims_student_information->permanent_ps ?? ' ' }} {{ getPronoun($student?->eims_student?->gender, 'subject', true) }} has been a regular student of this institution in the session {{$student->eims_prev_session->name}} in class {{$student->eims_prev_semester_class->name}} {{ getPronoun($student?->eims_student?->gender, 'possessive', true) }} class roll number is {{$student->prev_roll_no}} and {{ getPronoun($student?->eims_student?->gender, 'possessive', false) }} last annual exam position was {{ $last_result?->class_position ? $last_result->class_position . getOrdinalSuffix($last_result->class_position) : ' ' }} {{ getPronoun($student?->eims_student?->gender, 'subject', true) }} achieved a GPA of {{$last_result->grade_point ?? ' '}} and a grade of {{$last_result->letter_grade ?? ' '}} {{ getPronoun($student?->eims_student?->gender, 'subject', true) }} studied at this school until {{ $student?->eims_student ? date('d/m/Y', strtotime($student?->eims_student?->created_at)) : null }} and left the school on {{ $student->promotion_date ? date('d/m/Y', strtotime($student->promotion_date)) : null }} after paying all his dues.

To the best of my knowledge, he has not engaged in any activities that undermine the standards of school discipline. {{ getPronoun($student?->eims_student?->gender, 'subject', true) }} is known for his exemplary behavior and character. I wish him every success in life

@if ($studentTransferCertificateFormate->is_visible_conditions == 1)
Reason for Leaving School:
  1. {{$condition_1}}.
  2. {{$condition_2}}.
@endif
@php $signatures = []; if ($studentTransferCertificateFormate->is_visible_class_teacher_signature_image == 1) { $signatures[] = [ 'name' => 'Class Teacher Name', 'designation' => 'Class Teacher', 'image' => null // Class Teacher Image Hidden (No Image Tag) ]; } if ($studentTransferCertificateFormate->is_visible_vice_principal_signature_image == 1) { $signatures[] = [ 'name' => 'Vice Principal Name', 'designation' => 'Vice Principal', 'image' => asset('images/eims/setting/design_student_transfer_certificate/vice_principal_signature_image/' . $studentTransferCertificateFormate->vice_principal_signature_image) ]; } if ($studentTransferCertificateFormate->is_visible_principal_signature_image == 1) { $signatures[] = [ 'name' => 'Principal Name', 'designation' => 'Principal', 'image' => asset('images/eims/setting/design_student_transfer_certificate/principal_signature_image/' . $studentTransferCertificateFormate->principal_signature_image) ]; } $count = count($signatures); @endphp @if($count == 1)
{{ $signatures[0]['name'] }}
{{ $signatures[0]['designation'] }}
@if ($signatures[0]['image']) Signature @endif @elseif($count == 2)
{{ $signatures[0]['name'] }}
{{ $signatures[0]['designation'] }}
@if ($signatures[0]['image']) Signature @endif
{{ $signatures[1]['name'] }}
{{ $signatures[1]['designation'] }}
@if ($signatures[1]['image']) Signature @endif @elseif($count == 3)
{{ $signatures[0]['name'] }}
{{ $signatures[0]['designation'] }}
@if ($signatures[0]['image']) Signature @endif
{{ $signatures[1]['name'] }}
{{ $signatures[1]['designation'] }}
@if ($signatures[1]['image']) Signature @endif
{{ $signatures[2]['name'] }}
{{ $signatures[2]['designation'] }}
@if ($signatures[2]['image']) Signature @endif @endif
@endforeach