@foreach($orders as $key=>$order) {{$key+ 1}} {{$order['id']}}
{{date('d M Y',strtotime($order['created_at']))}}
{{date(config('timeformat'),strtotime($order['created_at']))}}
@if($order->is_guest) @php($customer_details = json_decode($order['delivery_address'],true)) {{$customer_details['contact_person_name']}}
{{$customer_details['contact_person_number']}}
@elseif($order->customer)
{{$order->customer['f_name'].' '.$order->customer['l_name']}}
{{$order->customer['phone']}}
@else @endif @if($order->payment_status=='paid') {{translate('messages.paid')}} @else {{translate('messages.unpaid')}} @endif {{\App\CentralLogics\Helpers::format_currency($order['order_amount'])}} @if($order['order_status']=='pending') {{translate('messages.pending')}} @elseif($order['order_status']=='confirmed') {{translate('messages.confirmed')}} @elseif($order['order_status']=='processing') {{translate('messages.processing')}} @elseif($order['order_status']=='out_for_delivery') {{translate('messages.out_for_delivery')}} @elseif($order['order_status']=='delivered') {{translate('messages.delivered')}} @else {{str_replace('_',' ',$order['order_status'])}} @endif
@endforeach