Cara Mendapatkan Indeks di Foreach Loop di Laravel
@foreach ($items as $item)
{{ $loop->index }}
@endforeach
D_ACE
@foreach ($items as $item)
{{ $loop->index }}
@endforeach
@foreach ($teams as $key => $team)
{{ str_ordinal($key + 1) }}
@endforeach