@extends('admin::layouts.master') @section('content')
@lang('partials.list')
@lang('partials.create')
@if(isset($products) && count($products)) {{-- --}} {{-- --}} @forelse($products as $product) {{-- --}} {{-- --}} @empty @endforelse
@lang('partials.s_n') @lang('partials.sku') @lang('partials.title') @lang('sidebar.category') @lang('partials.is_featured') @lang('partials.price') @lang('messages.discount')@lang('partials.tags')@lang('sidebar.brands') @lang('partials.quantity')@lang('partials.image')@lang('partials.status') @lang('sidebar.attributes') @lang('partials.action')
{{ $loop->iteration }} {{ $product['sku'] ?? 'N/A' }} {{ $product['title'] ?? '' }} {{ isset($product['categories']) ? implode(', ', array_column($product['categories'], 'title')) : 'N/A' }} {{ !empty($product['is_featured']) ? 'Yes' : 'No' }} {{ $product['price'] ?? '' }} {{ $product['discount'] ?? '' }} @if(isset($product['tags']) && is_array($product['tags'])) {{ implode(', ', array_column($product['tags'], 'title')) }} @else N/A @endif {{ $product['brand']['title'] ?? 'N/A' }} {{ $product['stock'] ?? '' }} {{ $product['title'] ?? '' }} {{ ucfirst($product['status'] ?? '') }} @if(!empty($product['attributes']))
    @foreach($product['attributes'] as $attributeValue) @php $attr = $attributeValue['attribute'] ?? null; $column = $attr['type'] ?? 'text'; $value = $attributeValue['value'] ?? null; @endphp @if($attr && $value)
  • {{ $attr['name'] ?? $attr['label'] ?? '' }}: {{ $value }}
  • @endif @endforeach
@endif
@csrf @method('DELETE')
No products found!
@else
No products found!
@endif
@endsection