public function getComparativeReportDataByYears(Domain $domain, ClientSurvey $id, GetComparativeReport $request): JsonResource 	{ 		$client_survey = $id; 		$clientSurveyService = new ClientSurveyService; 		$clientSurveyService->checkIfSurveyBelongsToUser($client_survey, $request);  		$client_surveys = $client_survey->client->surveys()->whereHas('survey', function ($query) use ($client_survey) { 			$query->where('year', '<=', $client_survey->survey->year); 		})->with([ 			'survey.questions' => function ($query) { 				$query->comparableTypes(); 			}, 			'demographicQuestions' => function ($query) { 				$query->comparableTypes(); 			}, 			'extraQuestions' => function ($query) { 				$query->comparableTypes(); 			}, 			'locations', 			'departments', 		])->where([['survey_type', SurveyType::IZZ->value], ['created_at', '<=', $client_survey->created_at]])->latest()->get();  		return ClientSurveyComparativeReportDataResource::collection($client_surveys); 	}