@extends('dashboard.layouts.master') @section('title', 'Products') @section('content')

List of Products

@can('create-products') Add Products @endcan
Reset
@forelse ($products as $key => $product) @empty @endforelse
# Name Categories Price Weight Created Actions
{{ $products->firstItem() + $key }} {{ $product->title }} @if($product->categories->count()) @foreach($product->categories as $category) {{ $category->name }} @if(!$loop->last), @endif @endforeach @else N/A @endif {{ number_format($product->selling_price, 2) ?? 'N/A' }} {{ $product->weight ?? 'N/A' }} {{ $product->created_at->format('d M Y') }}
@can('view-products') View @endcan @can('update-products') Edit @endcan @can('delete-products')
@csrf @method('DELETE')
@endcan @if(isAffiliater()) @endif
No products found.
{{ $products->links() }}
@endsection