{{ Str::limit($unit->description, 120) }}
@if (count($unit->lesson_types)) @php $badgeColors = [ 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', ]; $colorIndex = 0; @endphp @foreach ($unit->lesson_types as $lessonTypeId) @php $type = $lessonTypes->firstWhere('id', $lessonTypeId); $color = $badgeColors[$colorIndex % count($badgeColors)]; $colorIndex++; @endphp @if ($type) {{ $type->name }} @endif @endforeach @endif
@endif