@extends('layout.index') @section('seo') @endsection {{-- @dd($noticia); --}} @section('content') {{-- @include('pages.noticias.sections.banner') --}} @include('pages.noticias.show.banner') @include('pages.noticias.show.share') {!! $noticia->content !!} @php $raw = $noticia->tags ?? ''; $raw = trim($raw, "\"' \t\n\r\0\x0B"); if (str_contains($raw, '\u')) { $jsonStr = '"'.addcslashes($raw, "\\\"").'"'; $decoded = json_decode($jsonStr, true); if (json_last_error() === JSON_ERROR_NONE) { $raw = $decoded; } } if (is_string($raw) && str_starts_with($raw, '[') && str_ends_with($raw, ']')) { $tags = json_decode($raw, true) ?: []; } else { $tags = array_filter(array_map('trim', explode(',', (string) $raw))); } @endphp @if (!empty($tags)) @foreach ($tags as $tag) {{ $tag }} @endforeach @endif @include('pages.noticias.show.previews') @endsection