<table id="example3" class="table table-striped table-bordered dt-responsive nowrap" style="width:100%">
    <thead>
        <tr>
            <th>Sr.No</th>
            <th>Vendor Name</th>
            <th>Company Name</th>
            <th>IOL Name</th>
            <th>IOL Type</th>
            <th>Power</th>
            <th>Expiry</th>

        </tr>
    </thead>
    <tbody>
        @php $i=1;@endphp
        @foreach($data as $result)
        <tr>
            <td>{{$i}}</td>

            <td>{{$result->VedName}}</td>
            <td>{{$result->IolCompName}}</td>
            <td>{{$result->Cname}}</td>

            <td>{{$result->Model}}</td>
            <td>{{$result->Power}}</td>
            <td>{{$result->ExpMonth}}/{{$result->ExpYear}}</td>

        </tr>
        @php $i++;@endphp
        @endforeach

    </tbody>
</table>
<script type="text/javascript">
$(document).ready(function() {
    $('#example3').DataTable({
        "scrollX": true,
        "pageLength":20,
        dom: 'Bfrtip',
        buttons: [

            'excelHtml5'

        ]
    });
});
</script>