<table id="example" class="table table-striped table-bordered dt-responsive nowrap" style="width:100%">
    <thead>
        <tr>
        <th>Counselling Id</th>
                <th>Mrd. No</th>
                <th>Patient Name</th>
                <th>Age/Gender</th>
                <th>Phone</th>   
                <th>Address</th> 
                <th>City</th>   
                <th>Admission Date</th>   
                <th>Counselling Date</th>
                <th>Surgery Date</th>   
                <th>Site</th>
                <th>Diagnosis</th>
                <th>Surgery Name</th>
                <th>Surgeon Name</th>
                <th>Anaesthetist</th>  
                <th>Action</th>
        </tr>
    </thead>
    <tbody>
        
        @foreach($data as $result)
        <tr>
         
            <td>{{$result->id}}</td>
            <td>{{$result->MrdNo}}</td>
            <td>{{$result->PatientName}}</td>
            <td>{{$result->Age}} / {{$result->Gender}}</td>
            <td>{{$result->Phone}}</td>
            <td>{{$result->Address}}</td>
            <td>{{$result->City}}</td>
            <td>{{date("d/m/Y", strtotime(str_replace('-', '/',$result->AdmissionDate)))}}</td>
            <td>{{date("d/m/Y", strtotime(str_replace('-', '/',$result->CounsellingDate)))}}</td>
            <td>{{date("d/m/Y", strtotime(str_replace('-', '/',$result->SurgeryDate)))}}</td>
            <td>{{$result->Site}}</td>
            <td>{{$result->Diagnosis}}</td>
            <td>{{$result->SurgeryName}}</td>
            <td>{{$result->SurgenName}}</td>
            <td>{{$result->Anaesthetist}}</td>
            <td><a data-id="{{$result->id}}" href='javascript:void(0);' data-toggle="tooltip" data-placement="top" title="Delete" data-original-title="Delete" class="delete"><i class="lnr lnr-trash text-danger"></i></a></td>
        </tr>
        @endforeach
    </tbody>
</table>
<script type="text/javascript">
$(document).ready(function() {
    $('#example').DataTable({
        "scrollX": true
       
    });
});
</script>