Support the ongoing development of Laravel.io →
posted 10 years ago
Database Blade
Last updated 3 years ago.
0

You should group results by 'kind' field or change foreach

@foreach($animals as $i=>$animal) 

and use an if

@if($i>0 && $animals[$i-1]->kind != $animal->kind)
0

Sign in to participate in this thread!

PHPverse

Your banner here too?

elker elker Joined 17 May 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.