laravelのページネーションで行番号をインクリメントする方法は?ページネーションを使用して2ページ以上に移動すると、最初に戻ります。たとえば、私はページネーションします(3)
<thead>
<tr>
<th>No</th>
<th>Name</th>
</tr>
</thead>
<tbody>
<?php $i = 1; ?>
@foreach ($telephone->results as $telp)
<tr>
<td>
{{$i++}}
</td>
<td>{{ $telp->name }}</td>
</tr>
@endforeach
</tbody>
2ページ目に行くと、番号は再び1から始まります。
私はそれを作る必要があります.2ページに行くと4から始まります.