@extends('backend.layouts.layout') @section('content')

Products

{{-- @include('backend.partials.messages') --}}

Products List

@if(request('search')) @endif
@php $startNumber = ($products->currentPage() - 1) * $products->perPage() + 1; @endphp @foreach($products as $product) @php // Get the first image for this product from ProductImage table $productImage = $product->images()->first(); @endphp @endforeach @if($products->count() == 0) @endif
# Image Product Name SKU Category Sub Category Sub-SubCategory Status Actions
{{ $startNumber++ }} @if($productImage) {{ $product->name }} @else
@endif
{{ $product->name }}
{{ ucfirst(str_replace('_', ' ', $product->stock_status)) }} Qty: {{ $product->stock_quantity }}
@if(!empty($product->is_featured) || !empty($product->is_hot) || !empty($product->is_trending) || !empty($product->is_sale))
@if($product->is_featured) Featured @endif @if($product->is_hot) Hot @endif @if($product->is_trending) Trending @endif @if($product->is_sale) Sale @endif
@endif
{{ number_format($product->price, 2) }} @if($product->compare_price && $product->compare_price > $product->price)
{{ number_format($product->compare_price, 2) }} {{ round((($product->compare_price - $product->price) / $product->compare_price) * 100) }}% OFF
@endif
{{ $product->sku_code }} {{ $product->category->name ?? 'N/A' }} {{ $product->childCategory->name ?? 'N/A' }} {{ $product->subcategory->name ?? 'N/A' }}
Brand: {{ $product->brand->name ?? 'N/A' }}
{{ ucfirst($product->status) }}
@csrf @method('DELETE')
No products found
Showing {{ $products->firstItem() }} to {{ $products->lastItem() }} of {{ $products->total() }} entries
{{ $products->appends(request()->except('page'))->links('pagination::bootstrap-4') }}
@endsection @section('scripts') @endsection