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