@if($search || $classFilter || $subscriptionFilter || $statusFilter) @endif
@forelse($customers as $student) @php $avatarColors = ['bg-primary', 'bg-success', 'bg-info', 'bg-warning', 'bg-danger']; $avatarColor = $avatarColors[$student->id % count($avatarColors)]; $initials = strtoupper( mb_substr($student->first_name, 0, 1) . mb_substr($student->last_name, 0, 1) ); $currentSubscription = $student->subscriptions->first(); $subscriptionPlan = $currentSubscription?->subscriptionPlan; @endphp @empty @endforelse
{{ __('admin.students.table.student') }} {{ __('admin.students.table.email') }} {{ __('admin.students.table.class') }} {{ __('admin.students.table.subscription') }} {{ __('admin.students.table.sponsor') }} {{ __('admin.students.table.quizzes') }} Statut {{ __('admin.students.table.actions') }}
{{ $student->email }} {{ $student->schoolClass?->name ?? '-' }} @if($subscriptionPlan) @if($subscriptionPlan->name === 'Premium') Premium @else Free @endif @else Free @endif @if($student->referredBy) {{ $student->referredBy->full_name }} @else - @endif {{ $student->quizzes->count() }} @if($student->is_active) Actif @else Inactif @endif
{{ __('admin.students.no_students_found') }}
{{ __('admin.students.pagination.showing') }} {{ $customers->firstItem() ?? 0 }}-{{ $customers->lastItem() ?? 0 }} {{ __('admin.students.pagination.of') }} {{ $customers->total() }}
{{ $customers->links() }}