@extends('layouts.admin') @section('title', $customer->name) @section('page_title', $customer->name) @section('toolbar') Edit @if($customer->id !== auth()->id())
@csrf @method('DELETE')
@endif @endsection @section('content')
Orders
{{ $customer->orders->count() }}
Spent
₹{{ number_format($spent, 0) }}
Addresses
{{ $customer->addresses->count() }}

Account

Name
{{ $customer->name }}
Email
{{ $customer->email }}
Phone
{{ $customer->phone ?: '—' }}
Role
{{ ucfirst($customer->role) }}
Registered
{{ $customer->created_at->format('d M Y, h:i A') }}

Addresses

@forelse($customer->addresses as $address)
{{ $address->label }} @if($address->is_default) Default @endif
{{ $address->name }} · {{ $address->phone }}
{{ $address->address }}, {{ $address->city }} {{ $address->pincode }}
@empty
No saved addresses.
@endforelse

Orders

@forelse($customer->orders as $order) @empty @endforelse
Order Status Payment Total Date
{{ $order->order_number }} {{ ucfirst($order->status) }} {{ strtoupper($order->payment_method) }} ₹{{ number_format($order->total, 0) }} {{ $order->created_at->format('d M Y') }}
This customer has not placed an order.
@endsection