@php $items = $section['parameters']['items'] ?? []; $layoutType = $section['parameters']['layout_type'] ?? 'vertical'; $backgroundColor = $section['parameters']['background_color'] ?? '#f8f9fa'; $renderText = function($text) { if (is_string($text) && (strpos($text, '{"type"') === 0 || strpos($text, '{"content"') === 0)) { return app(\V2\Services\ContentRichEditor\Services\ContentRichEditorRendererService::class)->toHtml($text); } return $text; }; @endphp
@foreach($items as $item) @php $link = $item['link'] ?? null; $hasLink = !empty($link); if ($hasLink && !preg_match('/^https?:\/\//i', $link) && strpos($link, '/') !== 0) { $link = '/' . $link; } @endphp @endforeach