@php $t_rowspan_grp=[];$groupe_old=""; @endphp @foreach($liste_fragilites as $fragilite) @php $groupe=$fragilite->groupe; if($groupe==$groupe_old) $t_rowspan_grp[$groupe]+=1; else $t_rowspan_grp[$groupe]=1; $groupe_old=$groupe; @endphp @endforeach @php $groupe_old="";$style_tr="background-color:lightgrey;";$nbg=0;$nb=0; @endphp @foreach ($liste_fragilites as $fragilite) @php $nb++; $groupe=$fragilite->groupe; if($groupe!=$groupe_old) $nbg++; //$color_tr=($nbg%2)?"#b2b2b2":"lightgrey"; $color_td=($nbg%2)?"#e7eaf6":"#a2a8d3"; $color_tr=$color_td; $base_style="padding:2px;vertical-align:middle;"; $style_tr=$base_style."background-color:".$color_tr; $style_td=$base_style."background-color:".$color_td; $etat=isset($allocataire_fragilite->id)?$fragilite->getAllocatairePoints($allocataire_fragilite->id):0; @endphp @if($groupe!=$groupe_old) @endif @php $groupe_old=$groupe; @endphp @endforeach
Groupe Libelle Etat 0pt Etat 1pt Etat 2pt 0
Points
{!! $fragilite->GroupeNom !!}{!! $fragilite->libelle !!} {!! $fragilite->etat0 !!} {!! $fragilite->etat1 !!} {!! $fragilite->etat2 !!}