@extends('admin.admin_dashboard') @section('admin') @php //Orders $orders = App\Models\Order::where('status', 'active')->where('order_status', 'completed')->latest()->get(); @endphp

Completed Orders

{{--
--}} @foreach($orders as $key => $order) @if($order->user) @endif @endforeach
s/n User Order Id Payment Id Order status order_date product_name product_qty Product_price Email Phone_no Country Address Order_notes Update Order Status
{{ $key+1 }} {{ $order->user->title }} {{ $order->user->firstname }} {{ $order->user->surname }} {{ $order->id }} {{ $order->payment->id }} @if( $order->order_status == 'pending') Pending @elseif( $order->order_status == 'processing') Processing @elseif( $order->order_status == 'completed') Completed @endif {{ \Carbon\Carbon::parse($order->created_at)->format('Y F jS - h:ia') }} {{ $order->product_name }} {{ $order->product_qty }} @if ($order->payment->currency == 'ESPEES') {{ $order->product_price_esp }} ESPEES @elseif ($order->payment->currency == 'usd' ) {{ $order->product_price_usd }} USD @endif {{ $order->payment->email }} {{ $order->payment->phone_number }} {{ $order->payment->country }} {{ $order->payment->street_address }}, {{ $order->payment->suburb }}, {{ $order->payment->city }}, {{ $order->payment->state }}, {{ $order->payment->order_notes }} Pending Processing Completed
@endsection