Created
June 22, 2013 23:15
-
-
Save ijy/5843047 to your computer and use it in GitHub Desktop.
A quick and easy way to limit a foreach loop in Laravel Blade.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@foreach (array_slice($posts->toArray(), 0, 5) as $post) | |
<h1>{{ $post['title'] }}</h1> | |
@endforeach |
Works like a charm!!.. Thank you
Thanks you.. it's work
tks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks you