@extends('layouts.app') @section('title', 'Dashboard') @section('content')
Dashboard Welcome back, {{ Auth::user()->name }}!
{{ \App\Models\Client::count() }}
Total Clients
{{ \App\Models\Billing::count() }}
Billings
${{ number_format(\App\Models\Billing::sum('total_amount_due') ?? 0, 2) }}
Revenue
${{ number_format(\App\Models\Payment::sum('amount') ?? 0, 2) }}
Collected
Recent Clients
@if(\App\Models\Client::count() > 0)
@foreach(\App\Models\Client::orderBy('created_at', 'DESC')->limit(5)->get() as $client) @endforeach
Name Email Phone Status
{{ $client->name }} {{ $client->email }} {{ $client->phone }} {{ ucfirst($client->status) }}
@else

No clients yet

@endif
Recent Billings
@if(\App\Models\Billing::count() > 0)
@foreach(\App\Models\Billing::orderBy('created_at', 'DESC')->limit(5)->get() as $billing) @endforeach
Client Amount Status Date
{{ $billing->client->name ?? 'N/A' }} ${{ number_format($billing->total_amount_due, 2) }} {{ ucfirst($billing->status) }} {{ $billing->created_at->format('M d, Y') }}
@else

No billings yet

@endif
@endsection @section('scripts') @endsection