Skip to content

Instantly share code, notes, and snippets.

@ChristopherDosin
Forked from JeffreyWay/example.html
Created April 20, 2015 18:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChristopherDosin/2a55552b11fbb1877593 to your computer and use it in GitHub Desktop.
Save ChristopherDosin/2a55552b11fbb1877593 to your computer and use it in GitHub Desktop.
// @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