@php $tabs = []; $quantity = min((int) $shortcode->quantity, 20); if ($quantity) { for ($i = 1; $i <= $quantity; $i++) { $tabs[] = [ 'title' => $shortcode->{'title_' . $i}, 'description' => $shortcode->{'description_' . $i}, ]; } } $tabsChunk = array_chunk($tabs, 3) @endphp
@if ($title = $shortcode->title)

{{ $title }}

@endif @if ($subtitle = $shortcode->subtitle)

{{ $subtitle }}

@endif
@foreach($tabsChunk as $tabs)
    @foreach($tabs as $tab)
  • @if ($tab['title'])
    {{ $tab['title'] }}
    @endif @if ($tab['description'])

    {{ $tab['description'] }}

    @endif
  • @endforeach
@endforeach