count(); $todayIncome = Payment::whereDate('payment_date', Carbon::today())->sum('total_amount'); return view('dashboard', compact('totalPatients', 'totalDoctors', 'todayRegistrations', 'todayIncome')); } }