public function getBasicReportData(Domain $domain, ClientSurvey $id, GetReportData $request): JsonResource 	{ 		$clientSurveyService = new ClientSurveyService; 		$clientSurveyService->checkIfSurveyBelongsToUser($id, $request);  		$client_survey = $id->load([ 			'survey.questions' => function ($query) { 				$query->comparableTypes(); 			}, 			'demographicQuestions' => function ($query) { 				$query->comparableTypes(); 			}, 			'extraQuestions' => function ($query) { 				$query->comparableTypes(); 			}, 			'locations', 			'departments', 		]);  		$client_survey->setAppends([ 			'highest_graded_questions' => $client_survey->survey->questions()->withAvg([ 				'answers' => function ($query) use ($client_survey) { 					$query->where('client_survey_id', $client_survey->getKey()); 				}, 			], 'answer_value')->orderBy('answers_avg_answer_value', 'desc')->limit(3)->get(), 			'lowest_graded_questions' => $client_survey->survey->questions()->withAvg([ 				'answers' => function ($query) use ($client_survey) { 					$query->where('client_survey_id', $client_survey->getKey()); 				}, 			], 'answer_value')->orderBy('answers_avg_answer_value', 'asc')->limit(3)->get(), 			'highest_graded_categories' => $client_survey->survey->categories()->includes()->withAvg([ 				'answers' => function ($query) use ($client_survey) { 					$query->where('answers.client_survey_id', $client_survey->getKey()); 				}, 			], 'answer_value')->orderBy('answers_avg_answer_value', 'desc')->limit(3)->get(), 			'lowest_graded_categories' => $client_survey->survey->categories()->includes()->withAvg([ 				'answers' => function ($query) use ($client_survey) { 					$query->where('answers.client_survey_id', $client_survey->getKey()); 				}, 			], 'answer_value')->orderBy('answers_avg_answer_value', 'asc')->limit(3)->get(), 		]);  		return new ClientSurveyBasicReportDataResource($client_survey); 	}