Я хочу отображать данные на основе предоставленной таблицы шаблонов, используя for и foreach l oop, но когда еще условия всегда отображают собственный индекс
Это мое ожидание:

This is my data :

And this is happening now :

and this is my code :
@for ($i = 0; $i < 7; $i++)
@foreach ($scheduleDetails as $item)
@if ($i == $item->day)
@else {{$ i}} @endif @endforeach @endfor
Спасибо ..