answers() ->whereHas('question', fn ($q) => $q->where('is_scored', true)) ->where('value', 'yes') ->count(); } /** * Determine the result based on the score. */ public function determineResult(int $score): string { if ($score >= 10) { return 'go'; } if ($score >= 5) { return 'consult_leadership'; } return 'no_go'; } }