-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$loop->index and $loop->iteration not working correctly #96
Comments
Yea, I think Laravel only makes this available within @foreach (not 100% on that though). As documented here, the $loop variable gives access to certain properties within the context of a particular loop. The list of properties has grown a bit larger in recent versions of Laravel to include a few that don't appear to be included in your implementation. As far as I can tell, these loop variables are initialized within each loop by your Also |
* For #96 added $loop->even and $loop->odd and $loop->iteration * Also, **$loop->index now starts with 0 instead of 1**
Done in #3.32
|
Hey there,
Was working with loop variables today, and am getting some issues involving $loop->index and $loop->iteration.
$loop->index is returning the 1-based index of current loop item (i.e. it is doing what $loop->iteration should be doing)
$loop->iteration does not appear to be implemented (just comes back as NULL)
Will take a look at source as time permits. Thanks for the package!
The text was updated successfully, but these errors were encountered: