@extends('layouts.app') @section('title', 'Produk Terlaris - Shop Bibit Cabai Bondowoso') @section('content')

BIBIT TERLARIS

Bibit cabai paling diminati petani di Bondowoso

@if(isset($statistics) && $statistics['total_products_sold'] > 0)

{{ number_format($statistics['total_products_sold']) }}

Total Bibit Terjual

{{ number_format($statistics['total_completed_orders']) }}

Pesanan Selesai

{{ $statistics['most_popular_product']->name ?? 'Belum Ada' }}

Produk Terpopuler

@endif @if($bestSellingProducts->count() > 0)
@foreach($bestSellingProducts as $index => $product)
@if($index < 3)
#{{ $index + 1 }}
@endif
{{ number_format($product->total_sold) }} terjual
{{ $product->name }}
{{ $product->name }}
Rp {{ number_format($product->price, 0, ',', '.') }}
Stok: {{ number_format($product->stock) }} {{ $product->stock > 0 ? 'Tersedia' : 'Habis' }}
{{ number_format($product->total_sold) }} terjual {{ number_format($product->total_orders) }} pembeli
@if($product->stock > 0)
@else @endif
@endforeach
@else

Belum Ada Produk Terlaris

Produk terlaris akan muncul setelah ada transaksi yang selesai.
Saat ini belum ada produk yang terjual.

Kembali ke Beranda
@endif
@endsection @push('styles') @endpush @push('scripts') @endpush