@extends('dashboard.layouts.app') @section('title', 'Data Drainase') @section('content')
Data Drainase
@csrf
@csrf
@csrf
Tambah Data
@if(session('success')) @endif @if(session('error')) @endif @if(session('import_errors')) @endif
@forelse($drainases as $drainase) @empty @endforelse
No Nama Saluran Panjang (m) Lebar (m) Kedalaman (m) Tipe Saluran Kondisi Aksi
{{ ($drainases->currentPage() - 1) * $drainases->perPage() + $loop->iteration }} {{ $drainase->nama_saluran }} {{ $drainase->panjang }} {{ $drainase->lebar }} {{ $drainase->kedalaman }} {{ ucfirst($drainase->tipe_saluran) }} {{ ucfirst($drainase->kondisi) }}
@csrf @method('DELETE')
Tidak ada data
@if($drainases->hasPages())
@php $currentPage = $drainases->currentPage(); $lastPage = $drainases->lastPage(); $showFirst = true; $showLast = true; $range = 2; $startPage = max(1, $currentPage - $range); $endPage = min($lastPage, $currentPage + $range); if ($startPage <= 1) { $showFirst = false; $startPage = 1; } if ($endPage >= $lastPage) { $showLast = false; $endPage = $lastPage; } if ($showFirst) { $isActive = 1 == $currentPage; $class = $isActive ? 'index active' : 'index'; echo '1'; if ($startPage > 2) { echo '...'; } } for ($i = $startPage; $i <= $endPage; $i++) { if (($showFirst && $i == 1) || ($showLast && $i == $lastPage)) { continue; } $isActive = $i == $currentPage; $class = $isActive ? 'index active' : 'index'; echo '' . $i . ''; } if ($showLast) { if ($endPage < $lastPage - 1) { echo '...'; } $isActive = $lastPage == $currentPage; $class = $isActive ? 'index active' : 'index'; echo '' . $lastPage . ''; } @endphp
@endif
@endsection