I have a table of questions and a table of answers
The relationship between them is many-to-many
While I retrieved all the questions, I cannot recall the answers because the questions are multiple and not a single question to fetch the answers through relationships
$exam=Exam::findOrFail($exam_id);
$questions=$exam->question;
$result = $questions -> result ;
but Code is not working
New contributor
abdo atef is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.