<table id="example" class="table table-striped table-bordered dt-responsive nowrap" style="width:100%">
    <thead>
        <tr>
            
            <th>Mrd. No</th>
            <th>Patient Name</th>
            <th>Phone</th>
            <th>Appointment Date</th>
            <th>Appointment TIme</th>
            <th>Appointment For</th>
            <th>Consultant</th>
            <th>Action</th>
        </tr>
    </thead>
    <tbody>
        @foreach($data as $result)
        <tr>
         
             <td>{{$result->MrdNo}}</td>
             <td>{{$result->PatientName}}</td>
             <td>{{$result->Phone}}</td>
             <td>{{date("d/m/Y", strtotime(str_replace('-', '/',$result->AppDate)))}}</td>
          
             <td>{{$result->AppTime}}</td>
            
             <td>{{$result->ReferFor}}</td>
             <td>{{$result->Consultant}}</td>
             
             <td>
             <a data-id="" href='/editAppointment/{{$result->id}}' data-toggle="tooltip" data-placement="top" title="Edit" data-original-title="Edit"><i class="fas fa-pencil-alt"></i></a>&nbsp;&nbsp;
             <a data-id="{{$result->id}}" href='javascript:void(0);' data-toggle="tooltip" data-placement="top" title="Delete" data-original-title="Delete" class="delete" id="bootbox-confirm"><i class="fas fa-trash"></i></a>
             </td>
            
        </tr>
        @endforeach
    </tbody>
</table>
<script type="text/javascript">
$(document).ready(function() {
    $('#example').DataTable({
      "scrollX": true,
        dom: 'Bfrtip',
        buttons: [
            
            'excelHtml5'
           
        ]
    });
});
</script>