<thead>
    <tr>
        <th>{{__('lang.admin_order_id')}}</th>
        <th>{{__('lang.admin_user_phone')}}</th>
        <th>{{__('lang.admin_product_name')}}</th>
        <th>{{__('lang.admin_order_quantity')}}</th>
        <th>{{__('lang.admin_total_amnt')}}</th>
        <th>{{__('lang.admin_delivery_status')}}</th>
        <th>{{__('lang.admin_order_delivery_date')}}</th>
        <th>{{__('lang.admin_order_date')}}</th>
    </tr>
</thead>
<tbody>
    @foreach($data as $res)
    <tr>
        <td><a title="Order Detail" href="{{ route('orders.show', $res->order_id)}}" target="_blank">#{{$res->order_id}}</a></td>
        <td>{{ isset($res->user)?$res->user->phone:'--' }}</td>
        <td><a title="Product Detail" href="{{ route('products.edit', $res->product_id)}}" target="_blank">{{($res->product_orders)?($res->product_orders->product)?$res->product_orders->product->name:'--':'--'}}</a></td>
        <td>{{ isset($res->product_orders) ? $res->product_orders->quantity : '--' }}</td>
        <td>{{ isset($res->product_orders) ? \Helpers::currency($res->product_orders->total_delivery_amount) : '--' }}</td>
        <td>{{ isset($res->delivery_status) ? $res->delivery_status->status : '--' }}</td>
        <td>{{ isset($res->delivery_date) ? \Helpers::commonDateFormate($res->delivery_date) : '--' }}</td>
        <td>{{ isset($res->created_at) ? \Helpers::commonDateTimeFormate($res->created_at) : '--' }}</td>
    </tr>
    @endforeach
</tbody>