Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// @foreach(array_chunk($posts->all(), 3) as $postSet)
@foreach(array_chunk($posts, 3) as $postSet)
<div class="row"> <!-- this div will surround every three posts -->
@foreach($postSet as $post)
<h3>{{ $post['title'] }}</h3>
@endforeach
</div>
@endforeach
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.