{{ $community->name }} # {{ $topic->channel->name ?? 'Channel' }}
@if(session('success'))
{{ session('success') }}
@endif
{{ substr($topic->creator->name ?? '?', 0, 1) }}

{{ $topic->title }}

{{ $topic->creator->name ?? __('Unknown Author') }} {{ $topic->created_at->format('F j, Y @ g:i A') }}
{!! nl2br(e($topic->body)) !!}
@if($topic->hasMedia('resources'))

{{ __('Attachments') }}

@foreach($topic->getMedia('resources') as $media) {{ $media->name }} @endforeach
@endif

{{ __('Discussion') }} {{ $topic->replies->count() }}

@forelse($topic->replies as $reply)
{{ substr($reply->creator->name ?? '?', 0, 1) }}
{{ $reply->creator->name ?? __('Unknown') }} {{ $reply->created_at->diffForHumans() }}
{!! nl2br(e($reply->body)) !!}
@if($reply->hasMedia('resources'))
@foreach($reply->getMedia('resources') as $media) 📎 {{ $media->name }} @endforeach
@endif
@empty
{{ __('No replies yet. Be the first to join the conversation!') }}
@endforelse
@csrf