@extends('admin.layouts.home') @section('title', 'Products Management') @section('styles') @endsection @section('content')

Products Management

Dashboard
Filter Products
Reset
Products List {{ $products->total() }} Products
@if($products->isEmpty())
No products found. Try adjusting your filters.
@else
@foreach($products as $product) @endforeach
ID Product Category Store Price Stock Status Created Actions
{{ $product->id }}
@if($product->thumbnail) {{ $product->name }} @else
@endif
{{ Str::limit($product->name, 30) }}
SKU: {{ $product->sku ?? 'N/A' }}
{{ $product->category->name ?? 'Uncategorized' }} {{ $product->store->name ?? 'N/A' }} ${{ number_format($product->price, 2) }} @if($product->stock > 10) {{ $product->stock }} @elseif($product->stock > 0) {{ $product->stock }} @else Out of stock @endif @php $statusClass = [ 'active' => 'bg-success', 'inactive' => 'bg-danger', 'pending' => 'bg-warning text-dark', ][$product->status] ?? 'bg-secondary'; @endphp {{ ucfirst($product->status) }} {{ $product->created_at->format('M d, Y') }}
{{ $products->appends(request()->query())->links('pagination::bootstrap-5') }}
@endif
@endsection @section('scripts') @endsection