@extends('layouts.app') @section('content')
Total Comment : {{$post->post_comments->count()}}
    @if( $post->post_comments->count() > 0 ) @foreach($post->post_comments as $index => $comment)
  • @php $img = !empty($comment->user->image) ? url( $comment->user->image ):url('public/assets/images/default-user.png') @endphp
    By: {{!empty($comment->user->name)?$comment->user->name:'Guest'}} on {{default_datetime_format($comment->created_at)}}
    {!! $comment->comment !!}
    {{ get_edit_button( '' , $comment->id , 'black text-primary' , 'Edit') }} {{ get_delete_button(route('comment.delete',$comment->id),$comment->id,'black text-danger deleteRecord','Delete')}}
  • @endforeach @else
  • No comment posted yet.
  • @endif
@endsection