<table id="example" class="table table-striped table-bordered dt-responsive nowrap" style="width:100%">
    <thead>
        <tr>
            <th>#</th>
            <th>Bill No</th>
            <th>Patient Name</th>
            <th>View</th> 
        </tr>
    </thead>
    <tbody>

        @foreach($data as $result)

        <tr>
            <td>{{$result->id}}</td>
            <td><a href="editSaleBill/{{$result->BillNo}}">{{$result->BillNo}}</a></td>
            <td>{{$result->PatientName}}</td>
             <td><a href="editSaleBill/{{$result->BillNo}}">View</a></td> 

        </tr>

        @endforeach
    </tbody>
</table>
<script type="text/javascript">
$(document).ready(function() {
    $('#example').DataTable({
        responsive: true,
        "order": [
            [0, "desc"]
        ],
    });
});
</script>