Shipments
To
@php
$columns = [
['label' => '#', 'column' => 'id', 'sort' => true],
['label' => 'Order Id', 'column' => 'id', 'sort' => true],
['label' => 'Customer name', 'column' => 'first_name', 'sort' => true],
['label' => 'Total Qty', 'column' => 'items_qty', 'sort' => true],
['label' => 'Shipping method', 'column' => 'shipping_method', 'sort' => true],
['label' => 'Order Date', 'column' => 'created_at', 'sort' => true],
['label' => 'Shipment Date', 'column' => 'shipped_date', 'sort' => true],
['label' => 'Actions', 'column' => 'action', 'sort' => false],
];
@endphp
@foreach ($orders as $key => $item)
{{ $loop->iteration }}
{{ $item->id }}
{{ $item->first_name . ' ' . $item->last_name }}
{{ $item->items_qty }}
{{ $item->shipping_method }}
{{ $item->created_at->format('d-m-Y') }}
{{ \Carbon\Carbon::parse($item->shipped_date)->format('d-m-Y') }}
@endforeach