@extends('pages.admin.layout') @section('content') @php $carbon = new Carbon\Carbon($customer->created_at); if($customer->last_login_date) { $last_login_date = new Carbon\Carbon($customer->last_login_date); $last_login_date = $last_login_date->format('l jS F Y @ h:i:s A'); } else { $last_login_date = 'Not logged in yet'; } $latestOrder = $customer->orders()->latest()->get(); @endphp

Customer: {{ucfirst($customer->name)}} {{ucfirst($customer->surname)}}

Customer information

{{ucfirst($customer->name)}} {{ucfirst($customer->surname)}}

{{($customer->whitelisted == 1) ? 'YES' : 'NO'}}

@if($customer->whitelisted == 0) Approve @else Unapprove @endif

{{ucfirst($customer->telephone)}}

{{ucfirst($customer->email)}}

{{$last_login_date}}
@if($latestOrder && count($latestOrder) > 0) @php $latestOrderDetails = $latestOrder[0]; $lastOrderDate = new Carbon\Carbon($customer->created_at); @endphp

{{ucfirst($latestOrderDetails->DeliveryFirstName)}} {{ucfirst($latestOrderDetails->DeliveryLastName)}}, @if($latestOrderDetails->DeliveryAddressLine1) {{$latestOrderDetails->DeliveryAddressLine1}}, @endif @if($latestOrderDetails->DeliveryAddressLine2) {{$latestOrderDetails->DeliveryAddressLine2}}, @endif @if($latestOrderDetails->DeliveryAddressLine3) {{$latestOrderDetails->DeliveryAddressLine3}}, @endif @if($latestOrderDetails->DeliveryCity) {{$latestOrderDetails->DeliveryCity}}, @endif @if($latestOrderDetails->DeliveryCounty) {{$latestOrderDetails->DeliveryCounty}}, @endif @if($latestOrderDetails->DeliveryPostcode) {{$latestOrderDetails->DeliveryPostcode}} @endif

View on Google Maps
{{$lastOrderDate->format('l jS F Y @ h:i:s A')}}
@endif

Edit Details

{{ method_field('PUT') }} @csrf

Change Password

{{ method_field('PUT') }} @csrf

Recent Orders

@foreach($customer->orders()->get() as $order) @php $carbon = new Carbon\Carbon($order->created_at); @endphp @endforeach
Invoice ID# Date Status Total Actions
{{$order->id}} {{$carbon->format('l jS F Y @ h:i:s A')}} {{ucfirst($order->status)}} £{{ number_format( $order->total, 2)}} View
@endsection