<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>Age/Gender</th>
            <th>Eye</th>
            <th>Diagnosis</th>
            <th>Admission Date</th>
          
            <th>Operation Date</th>
          
            <th>Discharge Date</th>
         
            <th>Action</th>
            <th>Print</th>
        </tr>
    </thead>
    <tbody>
        @foreach($data as $result)
        <tr>
         
             <td>{{$result->MrdNo}}</td>
             <td>{{$result->PatientName}}</td>
             <td>{{$result->AgeGender}}</td>
             <td>{{$result->OptEye}}</td>
             <td>{{$result->Diagnosis}}</td>
             <td>{{date("d/m/Y", strtotime(str_replace('-', '/',$result->AdmissionDate)))}}</td>
          
             <td>{{date("d/m/Y", strtotime(str_replace('-', '/',$result->OperationDate)))}}</td>
            
             <td>{{date("d/m/Y", strtotime(str_replace('-', '/',$result->DischargeDate)))}}</td>
             
             <td><a href='/{{projectUrl()}}editDischargeCard/{{$result->id}}' data-toggle="tooltip" data-placement="top" title="Edit" data-original-title="Edit" class="update"><i class="lnr lnr-pencil mr-2"></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="lnr lnr-trash text-danger"></i></a></td>
             <td><a href='javascript:void(0)' onclick="print({{$result->id}})" class="btn btn-info btn-sm"><i class="feather icon-printer"></i>&nbsp;Print </a></td>
        </tr>
        @endforeach
    </tbody>
</table>
<script type="text/javascript">
$(document).ready(function() {
    $('#example').DataTable({
      "scrollX": true,
        dom: 'Bfrtip',
        buttons: [
            
            'excelHtml5'
           
        ]
    });
});
</script>