@extends('layouts.layouts-landing') @section('title', 'My Orders') @section('content')
@forelse ($orders as $order)
{{ $order->order_code }} {{ $order->created_at->format('d M Y H:i') }}
{{ ucfirst($order->status) }}
@foreach ($order->items as $item)
{{ $item->product->name ?? 'Deleted' }}

{{ $item->product->name ?? 'Deleted' }}

Rp {{ number_format($item->price, 0, ',', '.') }} x {{ $item->quantity }}

Rp {{ number_format($item->price * $item->quantity, 0, ',', '.') }}

@endforeach
@if ($order->shippingCost) Shipping: {{ $order->shippingCost->destination }} @endif @if ($order->payment_method) Payment: {{ str_replace('_', ' ', ucfirst($order->payment_method)) }} @endif
Total: Rp {{ number_format($order->total_amount, 0, ',', '.') }}
@empty

No orders yet

Start Shopping
@endforelse
{{ $orders->links() }}
@endsection