@extends('admin.layouts.app') @section('title', 'Products') @section('heading', 'Products') @section('content')
{{ $products->total() }} total Page {{ $products->currentPage() }} of {{ max($products->lastPage(), 1) }}
Add Product @if($products->total() > 0)
@csrf
@endif
Catalog{{ $stats['total'] }}
On sale{{ $stats['on_sale'] }}
Low stock{{ $stats['low'] }}
Out of stock{{ $stats['out'] }}
Reset
@csrf
@forelse($products as $p) @empty @endforelse
Product Category Collection Price Stock Actions
{{ $p->name }} #{{ $p->id }} · {{ $p->created_at?->format('M d, Y') }}
{{ ucfirst($p->category) }} @if($p->collection_tag) {{ ucfirst(str_replace('_',' ',$p->collection_tag)) }} @else @endif Rs {{ number_format($p->price, 0) }} @if($p->original_price)
Rs {{ number_format($p->original_price, 0) }} @endif
@if($p->stock <= 0) Out @elseif($p->stock <= 5) Low ({{ $p->stock }}) @else {{ $p->stock }} @endif @csrf
@csrf @method('DELETE')
No products match your filters.
{{ $products->links() }}
@endsection