sql >> Base de Datos >  >> RDS >> Mysql

Laravel Eloquent consulta de división en matriz

Esto debería funcionar para usted

@foreach($specifications->groupBy('name') as $name => $specificationGrouped)
    <tr>
        <td>{{ $name }}</td>
        @foreach($specificationGrouped as $specification)
            <td>{{ $specification['detail'] }} ({{ $specification['device_id'] }})</td>
        @endforeach
    </tr>
@endforeach