load(['profileLimits.investmentType:id,code,name']); } protected function getItemName($item): string { return $item->name ?? $item->id; } protected function checkDependencies($item): ?JsonResponse { if ($item->userAssignments()->whereNull('expiry_date')->exists()) { return response()->json([ 'success' => false, 'message' => 'Profil had tidak boleh dipadam kerana masih ditugaskan kepada ahli.', ], 422); } return null; } }