Contoh sederhana memasukkan data ke tabel di Laravel 5.
<table class="table table-bordered"> <thead> <tr> <th>Client Code</th> <th>Client Name</th> </tr> </thead> <tbody> @foreach ($client as $data) <tr> <td>{{ $data->client_code }}</a></td> <td>{{ $data->client_name }}</td> </tr> @endforeach </tbody> </table>
<table class="table table-bordered"> <thead> <tr> <th>Client Code</th> <th>Client Name</th> </tr> </thead> <tbody> <?php $no = 0;?> @foreach ($client as $data) <?php $no++ ;?> <tr> <td>{{ $no }}</td> <td>{{ $data->client_code }}</a></td> <td>{{ $data->client_name }}</td> </tr> @endforeach </tbody> </table>
gan kalo ada paginationnya gimana??
pagination pakai datatables saja otomatis