@extends('layouts.app') @section('page_title','Customers') @section('content')<div class="card top-card"><div class="card-body"><div class="text-end mb-3"><a href="{{ route('customers.create') }}" class="btn btn-success">New Customer</a></div><table class="table"><thead><tr><th>Name</th><th>Company</th><th>Phone</th><th>Currency</th><th>Balance</th><th></th></tr></thead><tbody>@foreach($customers as $customer)<tr><td>{{ $customer->name }}</td><td>{{ $customer->company_name }}</td><td>{{ $customer->phone }}</td><td>{{ $customer->currency?->code }}</td><td>{{ number_format($customer->balance(),2) }}</td><td><a class="btn btn-sm btn-outline-primary" href="{{ route('customers.edit',$customer) }}">Edit</a></td></tr>@endforeach</tbody></table>{{ $customers->links() }}</div></div>@endsection
