@foreach($ensembleLimits as $ensembleLimit) {{ $ensembleLimit->ensemble->name }} @php $maxAccepted = $requestedEnsembleAccepts[$ensembleLimit->ensemble->id] ?? $ensembleLimit->maximum_accepted; @endphp @for($n=1; $n <= $maxAccepted; $n++) @php $entry = $seatableEntries->shift(); if (is_null($entry)) continue; @endphp {{ $n }} - {{ $entry->student->full_name() }} @endfor @endforeach