Level 67
If they are collection instances, you can $timetables->merge($subjectnames)and then $timetables will contain $subjectnames
I try to show some value using foreach loop but problem is that i have two objects and when i try to use in foreach loop its run 4 times 2+2 but i want only 2 times how can i combine them here is my code
<tbody class="text-center">
<?php $i = 0 ?>
@foreach($timetables as $classe_section)
@foreach($subjectnames as $subject)
<?php $i++ ?>
<tr>
<td>{{ $i }}</td>
<td>{{ $classe_section->courses['name'] }}</td>
<td>{{ $classe_section->sections['name'] }}</td>
<td>{{ $subject['name'] }}</td>
<td>
@foreach($testnames as $testname)
<a class="btn btn-primary" href="/teacher/student/{{$classe_section->courses['id']}}/{{$classe_section->sections['id']}}/{{$subject['id']}}/{{$testname['id']}}/test_amrks_upload">{{ $testname['name'] }}
</a>
@endforeach
</td>
</tr>
@endforeach
@endforeach
</tbody>
here i want merge $timetables and $subjectnames
Please or to participate in this conversation.