Is there any way to get pagination pretty url or something like this in laravel 5.1?
I have 15 rows in per page. And I want to increment the row count number even on paginate.
<?php $count = 1; ?>
<tr>
<th>No</th>
<th>Year</th>
<th>Action</th>
</tr>
@foreach($years as $year)
<tr>
<td width="20%">{{ $count++ }}</td>
<td width="50%">{{ $year->year }}</td>
<td width="30%">
<a href="{{ route('admin.year.edit', $year->id) }}" class="btn btn-info">Edit</a>
</td>
</tr>
@endforeach
But when I goes to next page the $count var starts from beginning. How can I get $count = 16 and it will increment and so on?