@extends('layouts.nova') @php use Carbon\Carbon; use Illuminate\Support\Str; @endphp @section('content') @php $headerTitle = data_get($topic ?? null, 'topic') ?? data_get($topic ?? null, 'title') ?? data_get($thread ?? null, 'title') ?? 'Thread'; $headerDesc = data_get($topic ?? null, 'discuss') ?? data_get($thread ?? null, 'content'); @endphp
← Back to forum

{{ $headerTitle }}

@if (!empty($headerDesc))

{!! Str::limit(strip_tags((string) $headerDesc), 260) !!}

@endif
@forelse (($posts ?? []) as $post) @php $authorName = $post->uname ?? data_get($post, 'user.name') ?? 'Anonymous'; $authorId = $post->user_id ?? data_get($post, 'user.id'); $postBody = $post->message ?? $post->content ?? ''; $postedAt = $post->post_date ?? $post->created_at ?? null; @endphp
{{ $authorName }}
@if (!empty($postedAt)) {{ Carbon::parse($postedAt)->format('d.m.Y H:i') }} @endif
{!! $postBody !!}
@if (!empty($authorId))
User ID: {{ $authorId }}
@endif
@empty
No posts yet.
@endforelse
@if (isset($posts) && method_exists($posts, 'links'))
{{ $posts->withQueryString()->links() }}
@endif
@endsection