<table id="example" class="table table-striped table-bordered" style="width:100%">
    <thead>
        <tr>
        <th>Sr No</th>
        <th>OT Date</th>
            <th>Mrd. No</th>
            <th>Patient Name</th>
            <th>Package Amount</th>
            <th>Insurane Company</th>
            <th>Request Amount</th>
            <th>Sanctioned Amount</th>
            <th>Additional Amt Paid from Patient</th>
            <th>Settle Amount</th>
            <th>Settle Date</th>
            <th>UTR No</th>
        </tr>
    </thead>
    <tbody>
        @php $i=1;@endphp
        @foreach($data as $result)
        <tr style="cursor: pointer;">
        <td>{{$i}}</td>
        <td>{{date("d/m/Y", strtotime(str_replace('-', '/',$result->CreatedDate)))}}</td>
             <td>{{$result->MrdNo}}</td>
             <td>{{$result->PatientName}}</td>
             <td>{{$result->PkgAmt}}</td>
             <td>{{$result->InsComp}}</td>
             <td>{{$result->ReqAmt}}</td>
             <td>{{$result->SanctAmt}}</td>
             <td>{{$result->AddAmt}}</td>
             <td>{{$result->SettleAmt}}</td>
             @if($result->SettleDate == '0000-00-00')
             <td>-</td>
             @else
             <td>{{date("d/m/Y", strtotime(str_replace('-', '/',$result->SettleDate)))}}</td>
             @endif
             <td>{{$result->UtrNo}}</td>
          
        </tr>
        @php $i++;@endphp
        @endforeach
    </tbody>
</table>
<script type="text/javascript">
$(document).ready(function() {
    $('#example').DataTable({
      "scrollX": true,
      "pageLength":50,
        dom: 'Bfrtip',
        buttons: [
            
            'excelHtml5'
           
        ]
    });
});
</script>