@php $tabs = []; $quantity = max((int) $shortcode->quantity, 4); if ($quantity) { for ($i = 1; $i <= $quantity; $i++) { if (($title = $shortcode->{'title_' . $i})) { $phone = []; $email = []; if($shortcode->{'phone_' . $i}) { $phone = explode(', ', $shortcode->{'phone_' . $i}); } if($shortcode->{'email_' . $i}) { $email = explode(', ', $shortcode->{'email_' . $i}); } $tabs[] = [ 'title' => $title, 'description' => $shortcode->{'description_' . $i}, 'phone' => $phone, 'email' => $email, 'image' => $shortcode->{'image_' . $i}, 'data_wow_delay' => '.' . $i - 1 . 's', ]; } } } @endphp
@foreach($tabs as $tab)
{{ Arr::get($tab, 'title') }}
{{ Arr::get($tab, 'title') }}

{!! BaseHelper::clean(Arr::get($tab, 'description')) !!}

@if (Arr::get($tab, 'email')) @foreach (Arr::get($tab, 'email') as $key => $email)

{{ $email }}

@endforeach @endif @if (Arr::get($tab, 'phone')) @foreach (Arr::get($tab, 'phone') as $phone)

{{ $phone }}

@endforeach @endif
@endforeach