Parent Applications
{{ $pendingApplications->total() }} Total
Showing {{ $pendingApplications->firstItem() ?? 0 }} to {{ $pendingApplications->lastItem() ?? 0 }} of {{ $pendingApplications->total() }} applications.
@forelse($pendingApplications as $key => $application) @php $status = strtolower((string) ($application->status ?? 'pending')); $statusClass = match ($status) { 'approved' => 'bg-success', 'rejected' => 'bg-danger', default => 'bg-warning text-dark', }; @endphp @empty @endforelse
S/L Parent Information Student Information Contact Information Status Applied At Actions
{{ ($pendingApplications->firstItem() ?? 0) + $key }}
{{ strtoupper(substr($application->name ?? 'P', 0, 1)) }}
{{ $application->name ?? 'N/A' }}
Application ID: #{{ str_pad($application->id, 6, '0', STR_PAD_LEFT) }}
Students: {{ $application->students_count ?? $application->students->count() }}
@forelse($application->students as $pendingStudent) @php $studentRecord = $pendingStudent->student; $sessionRecord = $pendingStudent->session; $classRecord = $pendingStudent->getRelation('class'); $sectionRecord = $pendingStudent->section; $groupRecord = $pendingStudent->group; $studentName = $studentRecord?->student_name_english ?? $studentRecord?->student_name ?? $studentRecord?->name ?? 'Student not found'; $sessionName = $sessionRecord?->session_name ?? $sessionRecord?->name ?? 'N/A'; $className = $classRecord?->class_name ?? $classRecord?->name ?? 'N/A'; $sectionName = $sectionRecord?->section_name ?? $sectionRecord?->name ?? 'N/A'; $groupName = $groupRecord?->group_name ?? $groupRecord?->name ?? null; $relationshipLabels = [ 'father' => 'পিতা', 'mother' => 'মাতা', 'guardian' => 'অভিভাবক', 'other' => 'অন্যান্য', ]; $relationshipKey = strtolower((string) ($pendingStudent->relationship ?? '')); $relationshipName = $relationshipLabels[$relationshipKey] ?? ($relationshipKey ? ucfirst($relationshipKey) : 'N/A'); @endphp
{{ $studentName }}
Session: {{ $sessionName }} | Class: {{ $className }} | Section: {{ $sectionName }} @if($groupName) | Group: {{ $groupName }} @endif
Roll: {{ $pendingStudent->class_roll ?? 'N/A' }} | Relation: {{ $relationshipName }}
@empty No student information submitted. @endforelse
{{ $application->phone ?: 'No phone number' }}
{{ $application->email ?: 'No email address' }}
{{ ucfirst($status) }}
{{ $application->created_at?->format('d M, Y') ?? 'N/A' }}
{{ $application->created_at?->format('h:i A') ?? '' }}
No parent applications found

Try changing the filters.

@if($pendingApplications->hasPages())
{{ $pendingApplications->onEachSide(1)->links() }}
@endif
{{-- Approve Application Modals --}} @foreach($pendingApplications as $application) @php $modalStatus = strtolower((string) ($application->status ?? 'pending')); $modalApproveStudents = $application->students ->filter(function ($student) { return !empty($student->student_id); }) ->unique('student_id') ->values(); $modalRelationshipLabels = [ 'father' => 'পিতা', 'mother' => 'মাতা', 'guardian' => 'অভিভাবক', 'other' => 'অন্যান্য', ]; @endphp @if($modalStatus === 'pending') @endif @endforeach