The relatively unknown @each function in a very powerful way to loop over data in Laravel Blade templates. It is powerful and much more elegant than @foreach. Suppose you want to loop over all comments on your article.
[Optional] The view partial that will be rendered if the array or collection is empty.
So, rendering a list of articles with their respective comments would look something like this: @each('articles.item', $articles, 'article', 'articles.no-items') {{ $article->title} @each('comments.item', $article->comments, 'comment', 'comments.no-items') {{ comment->author }} wrote: {{ comment->text}}.