For the table Exam I have this:
--id----section_id
--1----- 2,3
when I use this in Exam.php Model:
public function Sections(){
return $this->belongsTo(Section::class, 'section_id');
}
It only shows and take in consideration the section_id=2 but not both of the IDS. How I can get Info from both Ids ?
in the blade.php :
@foreach ($Exams as $exams)
<tr>
<td>{{$exams->id}}</td>
<td>{{$exams->Sections}}</td>
</tr>
@endforeach