@extends('admin.layouts.app') @section('title', 'User Details') @section('content')
Back to Users

{{ $user->name }}

@if($user->id !== auth()->id())
@csrf @method('PATCH')
@endif

User Information

{{ $user->is_active ? 'Active' : 'Inactive' }}
{{ strtoupper(substr($user->name, 0, 1)) }}

{{ $user->name }}

{{ ucfirst($user->role) }}
Email {{ $user->email }}
Phone {{ $user->phone ?? '-' }}
Address {{ $user->address ?? '-' }}
City {{ $user->city ?? '-' }}
County {{ $user->county ?? '-' }}
Joined {{ $user->created_at->format('M d, Y H:i') }}
{{ $user->orders->count() }}
Total Orders
KSh {{ number_format($user->total_spent, 0) }}
Total Spent

Recent Orders

@forelse($user->orders as $order) @empty @endforelse
Order # Total Status Date
{{ $order->order_number }} KSh {{ number_format($order->total, 2) }} {{ $order->status_badge['label'] }} {{ $order->created_at->format('M d, Y') }}
No orders yet
@endsection