You can use this for sequential numbering..
{{ ($users ->currentpage()-1) * $users ->perpage() + $loop->index + 1 }}
What is the best way to keep track of sequence numbers in the Livewire paginated table?
The first column in my table contains sequence numbers from 1 to "total number of rows" everything was fine with Blade's $loop->iteration but when I introduced pagination on each page that sequence is starting from 1 every time and I don't want that I want to keep track of each row's number.
What would be the best way to achieve this functionality?
| # | First Name |
| 1 | John |
| 2 | Jenny |
| 3 | Mark |
| 4 | Steve |
| # | First Name |
| 1 | Bob |
| 2 | Billy |
| 3 | Tiller |
| 4 | Scot |
| # | First Name |
| 1 | John |
| 2 | Jenny |
| 3 | Mark |
| 4 | Steve |
| # | First Name |
| 5 | Bob |
| 6 | Billy |
| 7 | Tiller |
| 8 | Scot |
You can use this for sequential numbering..
{{ ($users ->currentpage()-1) * $users ->perpage() + $loop->index + 1 }}
Please or to participate in this conversation.