@extends('layouts.app') @section('content')
Trang chủ Quản lý Exam

Quản lý Exam

@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif

Tổng số Exam: {{ $exams->total() }}

Tạo Exam
@forelse($exams as $index => $exam) @empty @endforelse
STT Tên Exam Slug EMS ID Number Limit Time Duration Số Exam Final Ngày tạo Hành động
{{ ($exams->currentPage() - 1) * $exams->perPage() + $index + 1 }} {{ $exam->name }} {{ $exam->slug }} {{ $exam->ems_id ?? '-' }} @if($exam->number_limit > 0) {{ $exam->number_limit }} @else @endif @if($exam->time_duration > 0) @php $days = floor($exam->time_duration / 86400); @endphp {{ $days }}d @else @endif {{ $exam->campaignExams->count() }} {{ $exam->created_at->copy()->addHours(7)->format('d/m/Y H:i') }}
Không có dữ liệu.
@if($exams->hasPages())
Hiển thị {{ $exams->firstItem() ?? 0 }} - {{ $exams->lastItem() ?? 0 }} trong tổng số {{ $exams->total() }} bản ghi
@if($exams->onFirstPage()) @else @endif @php $exams->appends(request()->all()); $currentPage = $exams->currentPage(); $lastPage = $exams->lastPage(); $onEachSide = 1; $start = max(2, $currentPage - $onEachSide); $end = min($lastPage - 1, $currentPage + $onEachSide); @endphp {{-- Page 1 --}} @if($currentPage == 1) 1 @else 1 @endif {{-- Start Ellipsis --}} @if($start > 2) ... @endif {{-- Middle Pages --}} @for($i = $start; $i <= $end; $i++) @if($i == $currentPage) {{ $i }} @else {{ $i }} @endif @endfor {{-- End Ellipsis --}} @if($end < $lastPage - 1) ... @endif {{-- Last Page --}} @if($lastPage > 1) @if($currentPage == $lastPage) {{ $lastPage }} @else {{ $lastPage }} @endif @endif @if($exams->hasMorePages()) @else @endif
@endif
@endsection @section('scripts') @endsection