@extends('frontend.layout.master') @section('title', $thread->title) @section('content')

{{ $thread->title }}

{{ $thread->user->name }} posted {{ $thread->created_at->diffForHumans() }}

{{ $thread->body }}

@if($replies->count() > 0)
Replies to Thread
@foreach($replies->sortBy('created_at') as $reply)
{{ $reply->user->name }} replied {{ $reply->created_at->diffForHumans() }}
{{ csrf_field() }}

{{ $reply->body }}

@endforeach
@endif @if ($replies->hasPages())
{{ $replies->render("pagination::bootstrap-4") }}
@endif @if(Auth()->check())
Reply to Thread
{{ csrf_field() }}
@if ($errors->has('body'))
{{ $errors->first('body') }}
@endif
@else

Please login to partisipate in the discussion.

@endif

This thread was published {{ $thread->created_at->diffForHumans() }} by {{ $thread->user->name }} and currently has {{ $thread->replies_count }} {{ Str::plural('reply', $thread->replies_count) }}.

@endsection