@extends('layouts.app') @section('title', $customer->name) @section('content')

{{ $customer->name }}

Edit Back
@if($customer->phone)
Phone
{{ $customer->phone }}
@endif @if($customer->address)
Address
{{ $customer->address }}
@endif
Loyalty points
{{ $customer->loyalty_points }}
@if($customer->invoices->isNotEmpty())
Purchase history
@foreach($customer->invoices as $inv) @endforeach
Invoice Date Total Actions
{{ $inv->invoice_number }} {{ $inv->invoice_date->format('d M Y') }} {{ number_format($inv->total, 2) }} View
@else

No purchase history yet.

@endif @endsection