
<table id="example" class="table table-striped table-bordered dt-responsive nowrap" style="width:100%">
    <thead>
        <tr>
            <th>#</th>
            <th>Frame Name</th>
            <th>Stock</th>
            <th>Sale</th>
        </tr>
    </thead>
    <tbody>
        @php $i=1;@endphp
        @foreach($data as $result)
        <tr>

            <td>{{$i}}</td>
            <td>{{$result->FrameName}}</td>
            <td>{{$result->TotDebit}}</td>
            <td>{{$result->TotCredit}}</td>
        </tr>
        @php $i++;@endphp
    @endforeach

    </tbody>
</table>
<script type="text/javascript">
$(document).ready(function() {
    $('#example').DataTable({
        "scrollX": true,
        dom: 'Bfrtip',
        "pageLength": 200,
        "order": [
            [0, "desc"]
        ],
        buttons: [

            'excelHtml5'

        ]
    });
});
</script>