@php
$totalOrders = \App\Models\Order::where('user_id', $user->id)->count();
$lastOrder = \App\Models\Order::where('user_id', $user->id)->latest()->first();
@endphp
{{ __('Total Orders') }}
{{ $totalOrders }}
{{ __('Last Order') }}
@if ($lastOrder)
{{ $lastOrder->created_at->format('M d, Y H:i a') }}
@else
{{ __('No orders yet') }}
@endif
@if ($lastOrder)
{{ __('Last Order Total') }}
{{ currencyFormat($lastOrder->total) }}
@endif