@for - Looping with a Fixed Range
Syntax
@for(variable = start; condition; increment)
// Code to execute
@endforExample
@for($i = 1; $i <= 5; $i++)
<p>Iteration: {{ $i }}</p>
@endforOutput
<p>Iteration: 1</p>
<p>Iteration: 2</p>
<p>Iteration: 3</p>
<p>Iteration: 4</p>
<p>Iteration: 5</p>Notes
Last updated