{{ $blogs->blog_title }}

{{ strtoupper(\Carbon\Carbon::parse($blogs->blog_date)->format('M d Y')) }}

@php $lines = preg_split('/\r\n|\r|\n/', trim($blogs->blog_description)); $formatted = ''; $inList = false; foreach ($lines as $line) { $trimmed = trim($line); // Detect if this line is the start of the bulleted section (based on pattern: "Title: description") if (preg_match('/^[A-Z].+?:\s/', $trimmed)) { if (!$inList) { $formatted .= '
    '; $inList = true; } $formatted .= "
  • {$trimmed}
  • "; } else { if ($inList && $trimmed !== '') { $formatted .= '
'; $inList = false; } if (!empty($trimmed)) { $formatted .= "

{$trimmed}

"; } } } // Close list if still open at end if ($inList) { $formatted .= ''; } @endphp
{!! $formatted !!}