public function scopeFilterByAnswers(Builder $query, ?array $filter_values = null): Builder 	{ 		return $query->when(isset($filter_values), function ($query) use ($filter_values) { 			foreach ($filter_values as $question_id => $answers) { 				$query->whereHas('answers', function ($query) use ($question_id, $answers) { 					$query 						->where('question_id', $question_id) 						->where(function ($query) use ($answers) { 							$regex = [];  							foreach ($answers as $answer) { 								$regex[] = '^' . $answer . '$|^' . $answer . ',|,' . $answer . '$|,' . $answer . ','; 							}  							$query 								->where('answer_value', 'regexp', implode('|', $regex)) 								->orWhereIn('answer_value', $answers); 						}); 				}); 			} 		}); 	}