Export {{-- Add --}}
@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' => 'Sales Person Name', 'column' => 'sales_id', '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->saleitems->isNotEmpty() && $item->saleitems[0]->saleproduct && $item->saleitems[0]->saleproduct->images->isNotEmpty()) @else @endif {{ $item->company_name }} {{ $item->customer_name }} {{ $item->salesperson->name ?? 'N/A' }} {{ $item->total_product }} {{ $item->total_amount }} {{ $item->tax }} {{ $item->grand_total }} {{-- {{$item->products->count()}} --}} @endforeach
@push('scripts') @endpush