A
A
AlmeryCloud2019-10-09 07:58:31
AJAX
AlmeryCloud, 2019-10-09 07:58:31

What is the best way to update the table when submitting the form via ajax?

What is the best way to update the data in the table when submitting the form via ajax, despite the fact that the data in the table is loaded from the database?

@foreach($data as $val)
<tr>
    <td>{{ $val->name }}</td>
    <td>{{ $val->exp_amount }}</td>
    <td>{{ $val->inc_amount}}</td>
</tr>
@endforeach

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Neverov, 2019-10-09
@TTATPuOT

You can use classes and insert data by class. You can use template engine. For example, Mustache and redraw the table from scratch.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question