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

List of Products

Reset
@can('create-products') Add Products @endcan
@forelse ($products as $key => $product) @empty @endforelse
ID Name Category Selling Price Weight Created At Action
{{$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 {{ $product->selling_price ?? '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 Product found
{{ $products->links() }}
@endsection