Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @if(isset($reply) && $reply === true)
- <div id="comment-{{ $comment->id }}" class="comment">
- @else
- <div id="comment-{{ $comment->id }}" class="comment">
- @endif
- <a class="avatar">
- @if ($comment->commenter->profile && $comment->commenter->profile->avatar_status == 1)
- <img src="/users/id//{{ $comment->commenter->id}}/uploads/images/avatar/avatar.jpg" alt="{{$comment->commenter->name}}">
- @else
- <img src="{{ Gravatar::get($comment->commenter->email) }}">
- @endif
- </a>
- <div class="content">
- <a class="author">{{ $comment->commenter->name }}</a>
- <div class="metadata">
- <div class="date">{{ $comment->created_at->diffForHumans() }}</div>
- <div class="rating">
- @include('laravelLikeComment::like', ['like_item_id' => $comment->id ])
- </div>
- </div>
- <div class="text">
- {!! $comment->comment!!}
- </div>
- <div class="actions">
- <a data-toggle="modal" data-target="#reply-modal-{{ $comment->id }}" class="reply">Reply</a>
- @can('comments.edit', $comment)
- <a data-toggle="modal" data-target="#comment-modal-{{ $comment->id }}" class="reply">Edit</a>
- @endcan
- @can('comments.delete', $comment)
- <a href="#" onclick="event.preventDefault();document.getElementById('comment-delete-form-{{ $comment->id }}').submit();" class="reply">Delete</a>
- <form id="comment-delete-form-{{ $comment->id }}" action="{{route('comments.delete', $comment->id) }}" method="POST" style="display: none;">
- @method('DELETE')
- @csrf
- </form>
- @endcan
- @include('comments::components.comment.forms')
- <br>
- @foreach($comment->children as $child)
- @include('comments::components.comment.comment', [
- 'comment' => $child,
- 'reply' => false
- ])
- @endforeach
- </div>
- </div>
- {!! isset($reply) && $reply === true ? '</div>' : '</div>' !!}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement