@extends('admin.layout') @section('title', 'Products Management') @section('heading', 'Catalogue Products') @section('content')
Show entries
@forelse($products as $product) @empty @endforelse
S.No Product Category Brand Price Stock Status Actions
{{ ($products->currentPage() - 1) * $products->perPage() + $loop->iteration }}
@if($product->image) {{ $product->name }} @else
@endif
{{ $product->name }} Added {{ $product->created_at->format('d M Y') }}
{{ $product->categoryModel->name ?? ($product->category ?: 'General') }} {{ $product->brandModel->name ?? ($product->brand ?: 'Unbranded') }}
₹{{ number_format($product->sale_price ?: $product->price, 2) }}
@if($product->sale_price && $product->sale_price < $product->price) ₹{{ number_format($product->price, 2) }} @endif
@if($product->stock > 5) {{ $product->stock }} @elseif($product->stock > 0) {{ $product->stock }} (Low) @else 0 (Out) @endif @if($product->is_active) ● Active @else ○ Draft @endif
Edit
@csrf @method('DELETE')
No products found in catalogue.
Showing {{ $products->firstItem() ?? 0 }} to {{ $products->lastItem() ?? 0 }} of {{ $products->total() }} entries
{{ $products->appends(request()->query())->links('admin.partials.pagination') }}
@endsection