@extends('layouts.app2') @push('styles') @endpush @section('content')

Dashboard

{{-- ============================================================ STAT CARDS — 4 kartu statistik Data diambil dari controller: $totalProduk, $totalDilihat, $totalStok, $totalKategori ============================================================ --}}
{{-- Card 1: Total Produk --}}
{{-- Diperbesar: width 72, height 72, stroke-width 3.6 --}}
Total Produk {{ $totalProduk ?? 24 }}
{{-- Card 2: Total Dilihat --}}
{{-- Diperbesar: width 72, height 55, stroke-width 3.8 --}}
Total Dilihat {{ number_format($totalDilihat ?? 5662, 0, ',', '.') }}
{{-- Card 3: Total Stok Barang --}}
{{-- Diperbesar: width 72, height 50, stroke-width 4.5 --}}
Total Stok Barang {{ $totalStok ?? 48 }}
{{-- Card 4: Total Kategori --}}
{{-- Diperbesar: width 60, height 60 (sudah proporsional & tebal dengan sendirinya) --}}
Total Kategori {{ $totalKategori ?? 4 }}
{{-- /stat-cards-row --}} {{-- ============================================================ TABEL — Produk Paling Sering Dilihat Data dari controller: $topProducts (collection) ============================================================ --}}

Produk Paling Sering Dilihat

@forelse($topProducts as $product) @empty @endforelse
Produk Kategori Kondisi Sisa Stok Total Dilihat
@php // Cek dan ambil gambar pertama jika datanya berupa array $gambarUtama = is_array($product['image']) ? $product['image'][0] : $product['image']; @endphp {{ $product['name'] }} {{ $product['name'] }}
{{ $product['category'] }} @if(strtolower($product['status']) === 'new') NEW @else SECOND @endif {{ $product['stock'] }} Pcs {{ number_format($product['views'], 0, ',', '.') }}
Belum ada data produk.
@endsection