@extends('backend.layouts.layout') @section('content')

Customer Profile

Customer profile picture

{{ $customer->name }}

Customer

  • Status
  • Email Verified @if($customer->email_verified_at) {{ $customer->email_verified_at->format('d M Y') }} @else Not Verified @endif
  • Member Since {{-- {{ $customer->created_at->format('d M Y') }}--}}
  • Total Orders {{ $customer->total_orders ?? 0 }}

Quick Stats

{{ $customer->total_orders ?? 0 }}

Total Orders

₹{{ number_format($customer->orders->sum('total_amount') ?? 0, 2) }}

Total Spent

  • Pending Orders {{ $customer->pending_orders ?? 0 }}
  • Completed Orders {{ $customer->completed_orders ?? 0 }}
  • Avg. Order Value ₹{{ $customer->total_orders > 0 ? number_format(($customer->orders->sum('total_amount') ?? 0) / $customer->total_orders, 2) : '0.00' }}
Full Name {{ $customer->name }}
Email Address {{ $customer->email }}
Phone Number {{ $customer->phone ?? 'N/A' }}
User Type {{ $customer->user_type }}
Account Status {{ ucfirst($customer->status) }}
{{-- --}}
Registration Date{{ $customer->created_at->format('d M Y, h:i A') }}
Last Login @if($customer->last_login_at) {{ $customer->last_login_at->format('d M Y, h:i A') }}
({{ $customer->last_login_at->diffForHumans() }}) @else Never logged in @endif
Last Updated {{-- {{ $customer->updated_at->format('d M Y, h:i A') }}--}}
IP Address {{ $customer->last_login_ip ?? 'N/A' }}
Browser/Device {{ $customer->user_agent ?? 'N/A' }}
@if($customer->orders && $customer->orders->count() > 0)
@foreach($customer->orders as $order) @endforeach
Order ID Date Items Total Status Payment Actions
#{{ $order->id }} {{ $order->created_at->format('d M Y') }} {{ $order->items_count ?? 0 }} items ₹{{ number_format($order->total_amount, 2) }} {{ ucfirst($order->status) }} {{ ucfirst($order->payment_status) }}
@else
No Orders Yet

This customer hasn't placed any orders yet.

@endif
@if($customer->addresses && $customer->addresses->count() > 0)
@foreach($customer->addresses as $address)

@if($address->is_default) Default @endif {{ $address->type == 'shipping' ? 'Shipping Address' : 'Billing Address' }}

{{ $address->full_name }}
{{ $address->address_line1 }}
@if($address->address_line2) {{ $address->address_line2 }}
@endif {{ $address->city }}, {{ $address->state }}
{{ $address->postal_code }}
Phone: {{ $address->phone }}

@endforeach
@else
No Addresses Found

This customer hasn't saved any addresses yet.

@endif
@php $activities = [ ['date' => now()->subDays(1), 'type' => 'login', 'message' => 'Logged in from Chrome on Windows'], ['date' => now()->subDays(2), 'type' => 'order', 'message' => 'Placed order #1234'], ['date' => now()->subDays(3), 'type' => 'profile', 'message' => 'Updated profile information'], ['date' => now()->subDays(5), 'type' => 'register', 'message' => 'Registered new account'], ]; @endphp @foreach($activities as $activity)
{{ $activity['date']->format('d M Y') }}
{{ $activity['date']->format('h:i A') }}

{{ $activity['message'] }}

@endforeach
@push('scripts') @endpush @endsection