{{-- HEADER --}}

Daftar Tahun

{{-- FILTER --}}
@if(request('search')) @endif
{{-- FLASH --}} @if (session('success'))
{{ session('success') }}
@endif {{-- DESKTOP TABLE --}} {{-- MOBILE CARD --}}
@forelse($tahuns as $tahun) @php $no = ($tahuns instanceof \Illuminate\Pagination\AbstractPaginator) ? $tahuns->firstItem() + $loop->index : $loop->iteration; @endphp

{{ $tahun->tahun }}

#{{ $no }}

Tahun Akademik

โœ๏ธ Edit
@csrf @method('DELETE')
@empty

Belum ada data tahun

Mulai dengan menambahkan tahun akademik pertama.

Tambah Tahun
@endforelse
{{-- PAGINATION --}} @if($tahuns instanceof \Illuminate\Pagination\AbstractPaginator && request('per_page') !== 'all') @php $currentPage = $tahuns->currentPage(); $lastPage = $tahuns->lastPage(); $perPage = request('per_page', 5); $search = request('search'); $from = $tahuns->firstItem() ?? 0; $to = $tahuns->lastItem() ?? 0; $total = $tahuns->total(); $window = 1; $rangeStart = max(2, $currentPage - $window); $rangeEnd = min($lastPage - 1, $currentPage + $window); $pagesWithDots = [1]; if ($rangeStart > 2) $pagesWithDots[] = '...'; for ($i = $rangeStart; $i <= $rangeEnd; $i++) $pagesWithDots[] = $i; if ($rangeEnd < $lastPage - 1) $pagesWithDots[] = '...'; if ($lastPage > 1) $pagesWithDots[] = $lastPage; $buildUrl = function(int $page) use ($perPage, $search): string { $params = ['page' => $page, 'per_page' => $perPage]; if ($search) $params['search'] = $search; return url()->current() . '?' . http_build_query($params); }; @endphp @if($total > 0)
Menampilkan {{ $from }}โ€“{{ $to }} dari {{ $total }} tahun @if($lastPage > 1) @endif
@endif @endif
0 tahun dipilih
@csrf @method('DELETE')
โš ๏ธ

Hapus Tahun?

Kamu yakin ingin menghapus 0 tahun yang dipilih?
Tindakan ini tidak dapat dibatalkan.