Skip to content

Commit 6cbefcf

Browse files
committed
Refactor to use the loop variable instead of the index
1 parent 5bc6068 commit 6cbefcf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/framework/resources/views/components/blog-post-feed.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<ol itemscope itemtype="https://schema.org/ItemList">
2-
@foreach(MarkdownPost::getLatestPosts()->values() as $index => $post)
2+
@foreach(MarkdownPost::getLatestPosts() as $post)
33
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem" class="mt-4 mb-8">
4-
<meta itemprop="position" content="{{ $index + 1 }}">
4+
<meta itemprop="position" content="{{ $loop->iteration }}">
55
@include('hyde::components.article-excerpt')
66
</li>
77
@endforeach

0 commit comments

Comments
 (0)