groupBy('label') ->orderByDesc('total') ->get(); // Penyakit dengan jumlah terbanyak $mostCommonDisease = $diseaseStats->first(); // Total produk $totalProducts = Product::count(); // Total user dan user terbaru $totalUsers = User::count(); $recentUsers = User::orderByDesc('created_at')->take(10)->get(); return view('dashboard', compact( 'totalDataset', 'diseaseStats', 'mostCommonDisease', 'totalProducts', 'totalUsers', 'recentUsers' )); } }