Refunds
To
@php
$columns = [
['label' => '#', 'column' => 'id', 'sort' => true],
['label' => 'Order Id', 'column' => 'id', 'sort' => true],
['label' => 'Refunded', 'column' => 'id', 'sort' => false],
['label' => 'Customer name', 'column' => 'first_name', 'sort' => true],
['label' => 'Refund Date', 'column' => 'refund_date', 'sort' => true],
['label' => 'Actions', 'column' => 'action', 'sort' => false],
];
@endphp
@foreach ($orders as $key => $item)
{{ $loop->iteration }}
{{ $item->id }}
$ {{ $item?->refund?->refund_amount }}
{{ $item->first_name . ' ' . $item->last_name }}
{{ \Carbon\Carbon::parse($item->refund_date)->format('d-m-Y') }}
@endforeach