@extends('layouts.app') @section('title', 'Halaman Dasbor') @section('content')

Halaman Dasbor

{{ $today }}
Kategori

{{ $totalKategori }}

Template

{{ $totalTemplate }}

Pelanggan

{{ $totalPelanggan }}

Pelanggan Terbaru

@forelse($recentPelanggan as $index => $pelanggan) @empty @endforelse
Nomor Nama Template Kategori Email No. Telepon Harga Tanggal Pemesanan Aksi
{{ $recentPelanggan->firstItem() + $index }} {{ $pelanggan->nama_pemesan }} {{ $pelanggan->nama_template }} {{ $pelanggan->kategori ?? '-' }} {{ $pelanggan->email }} {{ $pelanggan->no_tlpn ?? '-' }} Rp {{ number_format($pelanggan->harga, 0, ',', '.') }} {{ \Carbon\Carbon::parse($pelanggan->created_at)->format('d M Y') }}
Detail
Belum ada data pelanggan.
{{-- Tombol Previous --}} @if ($recentPelanggan->onFirstPage()) Prev @else Prev @endif @php $total = $recentPelanggan->lastPage(); $current = $recentPelanggan->currentPage(); @endphp {{-- Selalu tampilkan halaman pertama --}} @if ($current > 2) 1 @if ($current > 3) ... @endif @endif {{-- Hanya tampilkan 3 halaman di tengah (current-1, current, current+1) --}} @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 ($recentPelanggan->hasMorePages()) Next @else Next @endif
@foreach ($recentPelanggan as $pelanggan) @endforeach @endsection