Answer the question
In order to leave comments, you need to log in
Continuing iteration of @foreach loop?
Hi all.
I make a loop in the blade template with a foreach loop , use $loop->iteration for numbering, but since I use paginate in the controller, the numbering starts again when you switch to another page.
How to make it so that when switching, the numbering continues?
Thank you in advance.
PS Maybe the answer is already on the Internet (poke your nose), but I have not found the answer yet.
Answer the question
In order to leave comments, you need to log in
$counter = $(your variable)->firstItem();
$counter is then passed to the view and output $counter++
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question