id)->count(); $pendingServices = Service::where('user_id', $user->id) ->where('status', 'Menunggu') ->count(); $processedServices = Service::where('user_id', $user->id) ->where('status', 'Diproses') ->count(); $completedServices = Service::where('user_id', $user->id) ->where('status', 'Selesai') ->count(); // Mengambil layanan terbaru milik customer $latestServices = Service::where('user_id', $user->id) ->latest() ->take(5) ->get(); return view('customer.home', compact( 'user', 'totalServices', 'pendingServices', 'processedServices', 'completedServices', 'latestServices' )); } }