0
Personal I am new in programming and I am trying to solve my problem with foreach...
I have a foreach that returns me the groups of photos that have photos in them... however I need to take the first group that foreach find photos and apply the attribute checked in his input tag... I tried to do with Empty but I’m not getting... Below is the code... Thanks! Hug!
@foreach($property_get->getPhotoGroupList() as $key => $grupo)
<input id="tab{{ $key }}" type="radio" name="tabs" {{ !empty($key) ? 'checked' : ' ' }}>
<label class="band band-two lastWord" for="tab{{ $key }}">{{ $grupo->getName() }}</label>@endforeach
Give a print_r($property_get->getPhotoGroupList()) and put the result here
– Marcos Brinner
Ele aparece um array aqui

array:4 [▼
 3 => PhotoGroup {#391 ▶}
 1 => PhotoGroup {#394 ▶}
 2 => PhotoGroup {#406 ▶}
 4 => PhotoGroup {#409 ▶}
]
– Diego Jesus