Skip to content

Glossary: Laravel

$loop variable

Also written: $loop, $loop->iteration

A variable Blade gives you inside every loop; $loop->first is true on the first pass and $loop->iteration counts from 1.

Where the book teaches it

Related terms

@forelseDirective