@extends('layouts.app') @section('title', 'My Orders') @section('content')

My Orders

@if($orders->count() > 0)
@foreach($orders as $order)

Order #{{ $order->order_number }}

{{ $order->created_at->format('M d, Y') }}

{{ ucfirst($order->status) }}

${{ number_format($order->total, 2) }}

@foreach($order->items->take(4) as $item)
{{ substr($item->product_name, 0, 8) }}...
@endforeach @if($order->items->count() > 4)
+{{ $order->items->count() - 4 }}
@endif
View Details →
@endforeach
{{ $orders->links() }}
@else

No orders yet

Start Shopping
@endif
@endsection