@extends('layouts.app') @section('title', $thread->title . ' - Forum - ClearGame') @section('content')

{{ $thread->title }}

Started by {{ $thread->user->name }} • {{ $thread->created_at->format('M j, Y g:i A') }} • {{ $thread->views }} views @if($thread->is_sticky) Sticky @endif @if($thread->is_locked) Locked @endif
@auth @if(!$thread->is_locked) New Topic @endif @if(auth()->id() === $thread->user_id || auth()->user()->hasRole('admin')) @endif @else Login to Post @endauth
@if($topics->isEmpty())

No topics yet

Be the first to start a topic in this thread!

@auth @if(!$thread->is_locked) Create Topic @else
This thread is locked. You cannot create new topics.
@endif @else Login to Create Topic @endauth
@else
@foreach($topics as $topic)
{{ $topic->title }} @if($topic->is_pinned) Pinned @endif
Posted by {{ $topic->user->name }} • {{ $topic->created_at->diffForHumans() }}
{{ $topic->posts->count() }} {{ Str::plural('reply', $topic->posts->count()) }}
{!! nl2br(e(Str::limit($topic->content, 300))) !!} @if(strlen($topic->content) > 300) Read more @endif
@endforeach
{{ $topics->links() }}
@endif @if($thread->is_locked)
This thread is locked. You cannot create new topics.
@endif
@endsection