

        <div class="row">
            <div class="col-lg-12">
                  <div class="ibox ">
                    <div class="ibox-title">
                        <h3>Routine of Class : {{$class_name}} @if(!empty($section_name)) Section:{{$section_name}} @endif</h3>

                    </div>
                    <div class="ibox-content">
                        <div>
                        <table class="table">
                            <thead>
                                <th>S.N</th>
                                <?php $timecount = sizeof($time);
?>
                                @foreach($time as $times)
                                <th>{{$times->time_table}}</th>
                                @endforeach
                            </thead>
                            <tbody>
                                <tr>

                                @if($routinesetting[0]['weekend']=='1')
                                    <td colspan="{{$timecount}}" style="text-align: center;">Weekend</td>
                                    @else
                                    <td>Sunday</td>
                                      @for($j=0;$j<$timecount;$j++)
                                    @if($time[$j]['period_type']=='break')
                                    <td>break</td>
                                    @elseif($time[$j]['period_type']=='lunchbreak')
                                    <td>Lunchbreak</td>
                                    @else
                                    <td>
                                        @foreach($data as $datas)


                                        @if($datas->day=='sunday' && $datas->time_id==$time[$j]['id'])

                                        {{$datas->full_name.'/'.$datas->subject_name}}
                                        @endif
                                        @endforeach

                                    </td>
                                    @endif
                                    @endfor
                                    @endif
                                </tr>
                                   <tr>
                                      <td>Monday</td>


                                      @for($j=0;$j<$timecount;$j++)
                                    @if($time[$j]['period_type']=='break')
                                    <td>break</td>
                                    @elseif($time[$j]['period_type']=='lunchbreak')
                                    <td>Lunchbreak</td>
                                    @else
                                    <td>
                                         @foreach($data as $datas)


                                        @if($datas->day=='sunday' && $datas->time_id==$time[$j]['id'])

                                        {{$datas->full_name.'/'.$datas->subject_name}}
                                        @endif
                                        @endforeach
                                    </td>
                                    @endif
                                    @endfor

                                </tr>

                                   <tr>

                                    <td>Tuesday</td>
                                      @for($j=0;$j<$timecount;$j++)
                                    @if($time[$j]['period_type']=='break')
                                    <td>break</td>
                                    @elseif($time[$j]['period_type']=='lunchbreak')
                                    <td>Lunchbreak</td>
                                    @else
                                    <td>
                                         @foreach($data as $datas)


                                        @if($datas->day=='sunday' && $datas->time_id==$time[$j]['id'])

                                        {{$datas->full_name.'/'.$datas->subject_name}}
                                        @endif
                                        @endforeach
                                    </td>
                                    @endif
                                    @endfor

                                </tr>
                                 <tr>
                                      <td>Wednesday</td>


                                      @for($j=0;$j<$timecount;$j++)
                                    @if($time[$j]['period_type']=='break')
                                    <td>break</td>
                                    @elseif($time[$j]['period_type']=='lunchbreak')
                                    <td>Lunchbreak</td>
                                    @else
                                    <td>
                                         @foreach($data as $datas)


                                        @if($datas->day=='sunday' && $datas->time_id==$time[$j]['id'])

                                        {{$datas->full_name.'/'.$datas->subject_name}}
                                        @endif
                                        @endforeach
                                    </td>
                                    @endif
                                    @endfor

                                </tr>
                                   <tr>
                                      <td>Thursday</td>


                                      @for($j=0;$j<$timecount;$j++)
                                    @if($time[$j]['period_type']=='break')
                                    <td>break</td>
                                    @elseif($time[$j]['period_type']=='lunchbreak')
                                    <td>Lunchbreak</td>
                                    @else
                                    <td>
                                         @foreach($data as $datas)


                                        @if($datas->day=='sunday' && $datas->time_id==$time[$j]['id'])

                                        {{$datas->full_name.'/'.$datas->subject_name}}
                                        @endif
                                        @endforeach
                                    </td>
                                    @endif
                                    @endfor

                                </tr>
                                   <tr>

                                    <td>Friday</td>
                                      @for($j=0;$j<$timecount;$j++)
                                    @if($time[$j]['period_type']=='break')
                                    <td>break</td>
                                    @elseif($time[$j]['period_type']=='lunchbreak')
                                    <td>Lunchbreak</td>
                                    @else
                                    <td>
                                    </td>
                                    @endif
                                    @endfor

                                </tr>
                                   <tr>
                                @if($routinesetting[0]['weekend']=='7')
                                   <td>Saturday</td>
                                    <td colspan="{{$timecount}}" style="text-align: center;">Weekend</td>
                                    @else

                                      @for($j=0;$j<$timecount;$j++)
                                    @if($time[$j]['period_type']=='break')
                                    <td>break</td>
                                    @elseif($time[$j]['period_type']=='lunchbreak')
                                    <td>Lunchbreak</td>
                                    @else
                                    <td>
                                         @foreach($data as $datas)


                                        @if($datas->day=='sunday' && $datas->time_id==$time[$j]['id'])

                                        {{$datas->full_name.'/'.$datas->subject_name}}
                                        @endif
                                        @endforeach
                                    </td>
                                    @endif
                                    @endfor
                                    @endif
                                </tr>

                            </tbody>
                        </table>
                        </div>


                        </div>
                    </div>
                </div>
            </div>

