I am new to programming and 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 get the first group that the foreach find photos and apply the checked attribute on the input tag of it ... I tried to do with empty however I can not ... Follow the code below ... Thank you! Hugs!
@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