groupBy('label') ->orderByDesc('total') ->get(); // Penyakit dengan jumlah terbanyak $mostCommonDisease = $diseaseStats->first(); // Total produk $totalProducts = Product::count(); return view('dashboard', compact( 'totalDataset', 'diseaseStats', 'mostCommonDisease', 'totalProducts' )); } }