{{-- BUKU TERPOPULER SECTION --}}
@if (!empty($bukuPopuler) && $bukuPopuler->count())
Paling Laris

Buku Terpopuler

Koleksi buku favorit yang paling banyak dipinjam oleh para pengunjung perpustakaan kami.

@foreach ($bukuPopuler as $item) @php $habis = $item->eksemplar <= 0; @endphp
{{ $item->peminjaman_count }}x
@php $coverPath = $item->cover ?? $item->sampul; $finalPath = $coverPath ? (Str::contains($coverPath, '/') ? $coverPath : 'covers/' . $coverPath) : null; @endphp @if ($finalPath) {{ $item->judul }} @else
No Cover
@endif @if ($habis)
TIDAK TERSEDIA
@endif
{{ $item->nomor_panggil ?? '-' }}

{{ $item->judul }}

{{ $item->pengarang }}

{{ $item->penerbit }} {{ $item->tahun_terbit ?? '-' }}
@if ($habis) @else Lihat Detail @endif
@endforeach
@endif