@if ($post->category)
{{ $post->category }}
@endif
{{ $post->title }}
@if ($post->excerpt)
{{ $post->excerpt }}
@endif @if ($post->bodyIsHtml()) {{-- Rich-editor articles: render the HTML, styled via arbitrary child variants --}}
{!! $post->body !!}
@else
@php
$blocks = preg_split('/\n\n+/', trim($post->body));
$inline = function (string $t) {
$h = e($t);
$h = preg_replace('/\*\*(.+?)\*\*/s', '$1', $h);
$h = preg_replace('/(?$1', $h);
return $h;
};
$first = true;
@endphp
@foreach ($blocks as $block)
@php $block = trim($block); @endphp
@if ($block === '')
@continue
@elseif (\Illuminate\Support\Str::startsWith($block, '### '))
@endif
{{-- Gallery --}}
@if (! empty($post->galleryUrls()))
@endif
{{-- Embedded tool bridge --}}
{!! $inline(substr($block, 4)) !!}
@elseif (\Illuminate\Support\Str::startsWith($block, '## ')){!! $inline(substr($block, 3)) !!}
@elseif (\Illuminate\Support\Str::startsWith($block, '> '))@elseif (\Illuminate\Support\Str::startsWith($block, '- ')){!! $inline(preg_replace('/^>\s?/m', '', $block)) !!}
-
@foreach (preg_split('/\n/', $block) as $li)
@php $li = trim(preg_replace('/^-\s?/', '', trim($li))); @endphp
@if ($li !== '')
- {!! $inline($li) !!} @endif @endforeach
$first]) data-gsap="fade-up">{!! nl2br($inline($block)) !!}
@php $first = false; @endphp @endif @endforeachDon't just read it, do it
Our free interactive tools turn this article into your personal plan in minutes.