@csrf @method('PUT')
Profile Image
{{ $user->full_name }}

Thông tin cá nhân

Thông tin liên hệ

Lịch sử mua hàng

@if($orders->isEmpty())

Không có đơn hàng nào.

@else @foreach($orders as $order)
Đơn hàng #{{ $order->order_id }} {{ $order->status === 'Pending' ? 'Đang chờ' : ($order->status === 'Cancelled' ? 'Đã hủy' : ($order->status === 'Success' ? 'Hoàn thành' : 'Chưa xác định')) }}
@foreach($order->items as $item)
product image
{{ $item->product->product_name }}
{{ $item->quantity }} x {{ number_format($item->price) }}₫
@endforeach

Tổng tiền: {{ number_format($order->total_amount) }}₫

@if($order->status === 'Pending') @endif
@endforeach @endif

Đánh giá

@if($reviews->isEmpty())

Bạn chưa có đánh giá nào.

@else @foreach($reviews as $review)
{{ $review->product->product_name ?? 'Sản phẩm không tồn tại' }} {{ $review->created_at->format('d/m/Y') }}

@for ($i = 1; $i <= 5; $i++) @if ($i <= $review->rating) {{-- sao đầy --}} @else {{-- sao rỗng --}} @endif @endfor ({{ $review->rating }}/5)

Nội dung:{!! $review->comment !!}

@endforeach @endif