<table id="example" class="table table-striped table-bordered" style="width:100%">
    <thead>
        <tr>
            <th>Sr.No</th>
            <th>Primary Code</th>
            <th>Charges For</th>
            <th>Amount</th>
            <th>Days</th>
            <th>Final Amount</th>
            <th>Action</th>
        </tr>
    </thead>
    <tbody>
        @php $i=1;@endphp
        @if(isset($data) && count($data) > 0)
            @foreach($data as $result)
            @if($result)
            <tr>
                <td>{{$i}}</td>
                <td>{{$result->id ?? ''}}</td>
                <td>{{$result->Name ?? ''}}</td>
                <td>&#8377;{{number_format($result->Rate ?? 0, 2)}}</td>
                <td>{{$result->Days ?? 0}}</td>
                <td>&#8377;{{number_format($result->Amount ?? 0, 2)}}</td>
                <td>
                    <a data-id="{{$result->id ?? ''}}" href='javascript:void(0);' 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>  
            </tr>
            @php $i++;@endphp
            @endif
            @endforeach
        @else
            <tr>
                <td colspan="7" class="text-center">No charges added yet</td>
            </tr>
        @endif
    </tbody>
</table>
<script type="text/javascript">
// Table is simple, no DataTable needed
</script>