foreach($data as $key => $value)
{
dd($value);
}
@foreach($listdata as $data)
// normal iteration
{{ $data->iteration() }}
// if you using "paginate()" in your query, better use this iteration per-page below:
// for example:
// page 1 iteration = 1,2,3,4,5 ascending, 5,4,3,2,1 descending
// and page 2 iteration will be = 6,7,8,9,10 ascending, 10,9,8,7,6 descending
// iteration ascending (1,2,3,...)
{{ $data->firstItem() + $loop->index }}
// iteration descending (...,3,2,1)
{{ ($data->total()-$loop->index) - (($data->currentpage()-1) * $data->perpage()) }}
@endforeach
$loop->iteration < 9 ? '0' . $loop->iteration : $loop->iteration
@foreach ($users as $user)
@continue($user->type == 1)
<li>{{ $user->name }}</li>
@break($user->number == 5)
@endforeach
{{$loop->iteration < 10 ? '0'.$loop->iteration : $loop->iteration}}
@foreach($users as $index => $user)
<td>{{ $index + 1 }}</td>
<td>{{ $user->username }}</td>
@endforeach
foreach ($product as $p) {
echo $p->sku;
}