@if (isset($data) && $data) @foreach ($data->paragraphs()->where([['type', $typeKey], ['active', 1], ['parent_id', 0]])->orderby('order')->orderByDesc('created_at')->get() as $paragraph) @php $level = $loop->index + 1; $index = $loop->index + 1; @endphp @php $tranParagraph=($paragraph->translationsLanguage()->first()); if(!$tranParagraph){ $tranParagraph=($paragraph->translationsLanguage(config('languages.default'))->first()); } @endphp
  • {{ $index }}. {!! $tranParagraph->name !!}

    @if ($paragraph->childs()->where([['active', 1], ['type', $typeKey]])->count()) @endif
  • @endforeach @endif