@extends('dashboard.layouts.app') @section('title', 'Data Taman') @section('content')
Data Taman
@csrf
@csrf
@csrf
Tambah Data
@if(session('success')) @endif @if(session('error')) @endif @if(session('import_errors')) @endif
@forelse($tamans as $taman) @empty @endforelse
No Nama Taman Luas (m²) Kondisi Pengelola Status Kepemilikan Status Operasional Kecamatan Desa Aksi
{{ ($tamans->currentPage() - 1) * $tamans->perPage() + $loop->iteration }} {{ $taman->nama_taman }} {{ number_format($taman->luas_taman, 0, ',', '.') }} {{ ucfirst($taman->kondisi) }} {{ $taman->pengelola }} {{ ucfirst($taman->status_kepemilikan) }} {{ ucfirst($taman->status_operasional) }} {{ $taman->kecamatan?->nama_kecamatan ?? '-' }} {{ $taman->desa?->nama_desa ?? '-' }}
@csrf @method('DELETE')
Tidak ada data
@if($tamans->hasPages())
@php $currentPage = $tamans->currentPage(); $lastPage = $tamans->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