@extends('frontend.layouts.app') @section('styles') @endsection @section('content')
@if(Storage::disk('public')->exists('posts/'.$post->image)) {{$post->title}} @endif
{{ $post->title }} {!! $post->body !!}
{{ $post->comments_count }} Comments
@foreach($post->comments as $comment) @if($comment->parent_id == null)
{{ $comment->users->name }} {{ $comment->created_at->diffForHumans() }} @auth Replay @endauth
{{ $comment->body }}
@endif @if($comment->children->count() > 0) @foreach($comment->children as $comment)
{{ $comment->users->name }} {{ $comment->created_at->diffForHumans() }}
{{ $comment->body }}
@endforeach @endif @endforeach @auth
Leave a comment
@csrf
@endauth @guest @endguest
@include('pages.blog.sidebar')
@endsection @section('scripts') @endsection