@extends('admin.layouts.app') @section('title', 'Products') @section('content')

Products

Add Product
@forelse ($products as $product) @php $isUpdated = session('updated_id') == $product->id; @endphp {{-- Product Name --}} {{-- Category (NULL SAFE) --}} {{-- Price --}} {{-- Stock --}} {{-- Status --}} {{-- Actions --}} @empty @endforelse
Name Category Price Stock Status Actions
{{ $product->name ?? '—' }} @if($isUpdated) Updated @endif
{{ $product->category?->name ?? '—' }} {{ $product->price !== null ? format_price($product->price) : '—' }} {{ $product->stock_quantity ?? '—' }} {{ $product->is_active ? 'Active' : 'Inactive' }} Edit
@csrf @method('DELETE')
No products found
{{-- Pagination --}} {!! admin_pagination($products) !!} {{-- Auto-scroll + highlight removal --}} @if(session('updated_id')) @endif @endsection