@extends('layouts.admin') @section('title', 'Kelola Produk') @section('content')

Manajemen Produk

Kelola seluruh produk yang tersedia di katalog toko online.

Tambah Produk
{{-- Pencarian & Filter --}}
@if(request('search') || request('category')) @endif
Total: {{ $products->total() }} produk
{{-- Tabel Produk --}}
@forelse($products as $product) @empty @endforelse
# Gambar Nama Produk Kategori Harga Stok Status Aksi
{{ $loop->iteration + ($products->currentPage() - 1) * $products->perPage() }} @if($product->image && Storage::disk('public')->exists($product->image)) {{ $product->name }} @else
@endif
{{ $product->name }}
{{ $product->sku }}
{{ $product->category->name ?? '-' }} Rp {{ number_format($product->price, 0, ',', '.') }} @if($product->stock > 0) {{ $product->stock }} unit @else Habis @endif @if($product->is_active) Aktif @else Nonaktif @endif
@if(request('search') || request('category'))

Tidak ada produk yang cocok dengan filter yang dipilih.

Reset Filter @else

Belum ada produk yang ditambahkan.

Tambah Produk Pertama @endif
{{-- Pagination --}} @if($products->hasPages())
{{ $products->links('pagination::bootstrap-5') }}
@endif
{{-- Modal Konfirmasi Hapus --}} @endsection @section('scripts') @endsection