@while - Looping Until a Condition is Met
Syntax
@while(condition)
// Code to execute
@endwhileExample
@while($count <= 3)
<p>Count: {{ $count }}</p>
@php $count++ @endphp
@endwhileOutput (if $count = 1 initially)
$count = 1 initially)<p>Count: 1</p>
<p>Count: 2</p>
<p>Count: 3</p>Notes
Last updated