Ключевое значение Blade Foreach
@foreach ($nodes as $key => $node)
<li>{{ $key }}: {{ $node->url }}</li>
@endforeach
Thoughtless Tortoise
@foreach ($nodes as $key => $node)
<li>{{ $key }}: {{ $node->url }}</li>
@endforeach