my problem is that I have a foreach inside another foreach and the data that should appear are 3 but I get triple, this happens since I have two tables and I'm trying to get specific data from the first table are selected, this information I have it in the second table, so the repetition of the html code, if someone could give me an idea or even give me the solution to this problem would be much appreciated
My html:
<div class="form-group form-animate-text">
<h4>Alumnos</h4>
<select class="selectpicker form-control" multiple data-live-search="true" data-live-search-placeholder="Search" data-actions-box="true" name="alumno_id[]">
@foreach($alumnoDB as $fila)
@foreach($datosEvaluacionAlumno as $filaEvaluacionAlumno)
<option value="{{$fila->id}}" {{($filaEvaluacionAlumno->alumno_id == $fila->id) ? 'selected=selected' : ""}}>{{$fila->nombre_alumno}}</option>
@endforeach
@endforeach
</select>
</div>
It would be very helpful if someone knew how to solve it or at least have an idea of the solution