@extends('layouts.app') @section('title', 'Manajemen Fitur') @section('content')

Manajemen Fitur

@if (session('success'))
{{ session('success') }}
@endif @if ($errors->any())
@endif
@forelse ($fitur as $key => $item) @empty @endforelse
Nomor Fitur Harga Aksi
{{ $fitur->firstItem() + $key }} {{ $item->deskripsi }} Rp {{ number_format($item->harga, 0, ',', '.') }}
Belum ada fitur
{{-- Tombol Previous --}} @if ($fitur->onFirstPage()) Prev @else Prev @endif @php $total = $fitur->lastPage(); $current = $fitur->currentPage(); @endphp {{-- Selalu tampilkan halaman pertama --}} @if ($current > 2) 1 @if ($current > 3) ... @endif @endif {{-- Halaman tengah --}} @for ($i = max(1, $current - 1); $i <= min($total, $current + 1); $i++) @if ($i == $current) {{ $i }} @else {{ $i }} @endif @endfor {{-- Selalu tampilkan halaman terakhir --}} @if ($current < $total - 1) @if ($current < $total - 2) ... @endif {{ $total }} @endif {{-- Tombol Next --}} @if ($fitur->hasMorePages()) Next @else Next @endif
@foreach ($fitur as $item) @endforeach @foreach ($fitur as $item) @endforeach @endsection