<table id="example" class="table table-striped table-bordered dt-responsive nowrap" style="width:100%">
        <thead>
            <tr>
            <th>Sr.No</th>
                <th>Mrd. No</th>
                <th>Name</th>
                <th>Gender</th>
                <!-- <th>Consultant</th> -->
                <th>Age</th> 
                <th>Appointment Date</th>
                <th>Time</th>
                <th>Action</th>
            </tr>
        </thead>
        <tbody>
        @php $i=1;@endphp
        @foreach($data as $result)
        @if($result->Flag == 1)
                @php $appointcolor = "style='background-color: antiquewhite;'"; @endphp
        @else
            @php $appointcolor = ""; @endphp
        @endif
        
        <tr @php echo $appointcolor; @endphp>
             <td>{{$i}}</td>
             <td>{{$result->MrdNo}}</td>
             <td>{{$result->PatientName}}</td>
             <td>{{$result->Gender}}</td>
             <!-- <td>{{$result->ConsultantName}}</td> -->
             <td>{{$result->Age}}</td>
             <td>{{date("d-m-Y", strtotime(str_replace('-', '/',$result->AppointDate)))}}</td>
             <td>{{date("h:i a", strtotime(str_replace('-', '/',$result->AppointTime)))}}</td>
             <td>
             @if($result->Flag == 0)
               <button type="button" id="AddQueue{{$result->id}}" class="btn btn-secondary btn-finish" onclick="addInQueue({{$result->id}})">Add In Queue</button></td>
              @endif
              </tr>
        @php $i++;@endphp
        @endforeach
        </tbody>
    </table>
    <script type="text/javascript">
      $(document).ready(function() {
      $('#example').DataTable( {
        responsive: true
      });
      });
    </script>