@php use App\Support\Money; $tenant = \App\Support\Facades\Tenancy::get(); $brandStyle = $tenant->brand_primary_color ? ":root { --color-brand-600: {$tenant->brand_primary_color}; } .dark { --color-brand-600: {$tenant->brand_primary_color}; }" : null; $tabs = ['pending' => ['Awaiting payment', 'pending'], 'confirmed' => ['Confirmed', 'active'], 'cancelled' => ['Cancelled', 'dropped'], 'all' => ['All', null]]; @endphp
View public catalog
@foreach($tabs as $key => [$label, $status]) {{ $label }} {{ $status ? ($counts[$status] ?? 0) : $counts->sum() }} @endforeach
@forelse($enrollments as $enrollment) @php $student = $enrollment->student; $guardian = $student?->guardians->first(); $billed = $enrollment->invoices->where('status', '!=', 'cancelled')->sum('amount_due_cents'); $paid = $enrollment->invoices->sum(fn ($i) => $i->amountPaidCents()); @endphp @empty @endforelse
SubmittedStudentGuardianBatchPaid / BilledStatus
{{ $enrollment->created_at->format('d M, g:i A') }} @if($student && ! $student->trashed()) {{ $student->fullName() }} @else {{ $student?->fullName() ?? '—' }} @endif

{{ $student?->student_code }} · {{ $student?->emergency_contact_phone }}

{{ $guardian ? $guardian->first_name.' ('.$guardian->relationship.')' : '—' }}

{{ $guardian?->phone }}

{{ $enrollment->batch?->course?->name }}

{{ $enrollment->batch?->name }}

{{ Money::format($paid, $currency) }} / {{ Money::format($billed, $currency) }} {{ ['pending' => 'Awaiting payment', 'active' => 'Confirmed', 'dropped' => 'Cancelled'][$enrollment->status] ?? ucfirst($enrollment->status) }} @if($enrollment->status === 'pending')
@endif
Nothing here yet. Mark courses as “Show on website” to start taking online enrollments.
{{ $enrollments->links() }}