{{-- /guidebook/{slug} — single-article view, mirroring the prototype's "article view" pane. Same sidebar + sub-header as the index so users can jump categories without going back first. --}} @php $words = str_word_count(strip_tags((string) $article->body)); $readMin = max(1, (int) ceil($words / 200)); @endphp {{-- Sub header --}}
More / Guidebook / {{ $article->category }}
{{ $article->title }}
@include('user.guidebook._sidebar', ['activeCat' => $article->category])
{{ __('Back to articles') }}
{{ $readMin }} {{ __('min read') }} · Updated {{ $article->updated_at?->diffForHumans() }}
{{ $article->category }}

{{ $article->title }}

@if (session('success'))
{{ session('success') }}
@endif {{-- Markdown body. We strip raw HTML in the converter to keep the rendered output safe. Falls back to plain pre-wrap. --}}
@php $bodyHtml = ''; try { if (class_exists(\League\CommonMark\CommonMarkConverter::class)) { $converter = new \League\CommonMark\CommonMarkConverter([ 'html_input' => 'strip', 'allow_unsafe_links' => false, ]); $bodyHtml = (string) $converter->convert((string) ($article->body ?? '')); } } catch (\Throwable $e) { } @endphp @if ($bodyHtml) {!! $bodyHtml !!} @else
{{ $article->body }}
@endif
{{ __('Was this helpful?') }}
@csrf
@csrf
{{ __('Still stuck? Open a ticket →') }}
@if ($related->count())
{{ __('Related') }}
@foreach ($related->take(4) as $r) @php $rWords = str_word_count(strip_tags((string) $r->body)); $rRead = max(1, (int) ceil($rWords / 200)); @endphp
{{ $r->category }} {{ $rRead }} {{ __('min read') }}
{{ $r->title }}
@endforeach
@endif