Customer Information
Back}})
{{$customer->name}}
{{$customer->email}}{{$customer->phone}}
{{$customer->address}}
Customer History
Customer Since | Last Login Date | Last Order Date | Last Order Total | Last Month Total Order | Last Year Total Order | Total Order | |||||
{{$customer->created_at->format('d/m/Y')}} | {{$customer->updated_at->format('d/m/Y')}} | @php $lastOrder = $customer->orders()->latest()->first(); $lastMonthOrder = $customer->orders()->thismonth()->sum('order_total'); $lastYearOrder = $customer->orders()->thismonth()->sum('order_total'); $lastYearOrder = $customer->orders()->thisyear()->sum('order_total'); $totalOrder = $customer->orders()->sum('order_total'); @endphp @if( $customer->orders()->count() > 0){{$lastOrder->created_at->format('d/m/Y')}} | Tk {{$lastOrder->order_total}} | Tk {{$lastMonthOrder}} | Tk {{$lastYearOrder}} | Tk {{$totalOrder}} | @else-- | -- | -- | -- | -- | @endif