@php
$columns = [
['label' => 'Id', 'column' => 'id', 'sort' => true],
['label' => 'Image', 'column' => 'image', 'sort' => false],
['label' => 'Company Name', 'column' => 'company_name', 'sort' => true],
['label' => 'Customer Name', 'column' => 'customer_name', 'sort' => true],
['label' => 'Customer Phone', 'column' => 'phone', 'sort' => true],
['label' => 'Total Product', 'column' => 'email', 'sort' => true],
['label' => 'Total Amount', 'column' => 'status', 'sort' => true],
['label' => 'Tax', 'column' => 'status', 'sort' => true],
['label' => 'Grand Total', 'column' => 'status', 'sort' => true],
['label' => 'Actions', 'column' => 'action', 'sort' => false],
];
@endphp
@foreach ($orders as $key => $item)
{{ $item->id }}
@if ($item->items->isNotEmpty() && $item->items[0]->product && $item->items[0]->product->images->isNotEmpty())
@else
@endif
{{ $item->company_name }}
{{ $item->customer_name }}
{{ $item->customer?->phone }}
{{ $item->total_product }}
{{ $item->total_amount }}
{{ $item->tax }}
{{ $item->grand_total }}
{{-- {{$item->products->count()}} --}}
@endforeach