foreach in Blade works the same as a regular PHP foreach. You should be able to do something like:
@foreach ($nodes as $node)
<li>{{ $node->url }}</li>
@endforeachIf you need access to the array key value for each node:
@foreach ($nodes as $key => $node)
<li>{{ $key }}: {{ $node->url }}</li>
@endforeach
Leave a Reply