@extends('layouts.dashboard') @section('title', $pageTitle) @section('page_header')
{{ $pageTitle }} {{ $totalProducts }}
Total
Active {{ $pageTitle }} {{ $activeProducts }}
Active
Inactive {{ $pageTitle }} {{ $inactiveProducts }}
Inactive
@endsection @section('page_content') @if (session('status'))
{{ session('status') }}
@endif @if ($errors->any())
{{ $errors->first() }}
@endif
@if ($products->isEmpty())
No products found. Create one to get started.
@else
@foreach ($products as $key => $product) @endforeach
S.No Name Company SKU Cost Price Sale Price Categories Status Actions
{{ ++$key }} {{ $product->name }} {{ $product->company?->name ?? '—' }} {{ $product->sku ?? '—' }} {{ number_format((float) $product->cost_price, 2) }} {{ number_format((float) $product->sale_price, 2) }} @if ($product->categories->isEmpty()) @else
@foreach ($product->categories as $category) {{ $category->name }} @endforeach
@endif
@csrf
is_active)> {{ $product->is_active ? 'Active' : 'Inactive' }}
@endif
@endsection @push('styles') @endpush @push('scripts') @endpush