@foreach($compData as $comp)
@php print '
'; @endphp

{{$comp->title}} ({{$comp->id}})


{{$comp->description}}

@php $compDataValHead = ((isset($comp->dataHead))?$comp->dataHead:''); $compDataValFooter = ((isset($comp->dataFooter))?$comp->dataFooter:''); if ($compDataValHead != '') { $jsDec = json_decode($compDataValHead, true); print '
'; switch ($comp->totalColumns) { case '1': $col = 'col-md-12'; $style = ''; break; case '2': $col = 'col-md-6'; $style = ''; break; case '3': $col = 'col-md-4'; $style = ''; break; case '4': $col = 'col-md-3'; $style = ''; break; case '5': $col = ''; $style = 'width:20%;padding-right: 12.5px;position:relative'; break; } $arKeys = array_keys($jsDec); for ($i=0; $i < $comp->totalColumns; $i++) { $jsDecKey = isset($arKeys[$i])?$arKeys[$i]:''; print '
'.$jsDecKey.'
'; } print '
'; $i = 0; $ct = $comp->totalColumn-1; for ($i=0; $i < $comp->totalColumns; $i++) { if ($ct != $i) { print '
'; } else { print '
'; } $jsDecSub = isset($arKeys[$i])?true:false; if ($jsDecSub) { if (isset($jsDec[$arKeys[$i]])) { foreach ($jsDec[$arKeys[$i]] as $key => $value) { print '
'.$value.'

'; } } } else { print '

'; } print '
'; } print '
'; } if ($compDataValFooter != '') { $jsDecFoot = json_decode($compDataValFooter, true); print ''; } @endphp
@endforeach