Advertisement
Guest User

Untitled

a guest
May 20th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.21 KB | None | 0 0
  1.  
  2. @if(isset($reply) && $reply === true)
  3. <div id="comment-{{ $comment->id }}" class="comment">
  4. @else
  5. <div id="comment-{{ $comment->id }}" class="comment">
  6. @endif
  7.  
  8.     <a class="avatar">
  9.  
  10.         @if ($comment->commenter->profile && $comment->commenter->profile->avatar_status == 1)
  11.             <img src="/users/id//{{ $comment->commenter->id}}/uploads/images/avatar/avatar.jpg" alt="{{$comment->commenter->name}}">
  12.         @else
  13.             <img src="{{ Gravatar::get($comment->commenter->email) }}">
  14.         @endif
  15.  
  16.     </a>
  17.  
  18.  
  19.     <div class="content">
  20.         <a class="author">{{ $comment->commenter->name }}</a>
  21.         <div class="metadata">
  22.             <div class="date">{{ $comment->created_at->diffForHumans() }}</div>
  23.             <div class="rating">
  24.                 @include('laravelLikeComment::like', ['like_item_id' => $comment->id ])
  25.             </div>
  26.         </div>
  27.  
  28.         <div class="text">
  29.             {!! $comment->comment!!}
  30.         </div>
  31.         <div class="actions">
  32.             <a data-toggle="modal" data-target="#reply-modal-{{ $comment->id }}" class="reply">Reply</a>
  33.             @can('comments.edit', $comment)
  34.             <a data-toggle="modal" data-target="#comment-modal-{{ $comment->id }}" class="reply">Edit</a>
  35.             @endcan
  36.             @can('comments.delete', $comment)
  37.                 <a href="#" onclick="event.preventDefault();document.getElementById('comment-delete-form-{{ $comment->id }}').submit();" class="reply">Delete</a>
  38.                 <form id="comment-delete-form-{{ $comment->id }}" action="{{route('comments.delete', $comment->id)  }}" method="POST" style="display: none;">
  39.                     @method('DELETE')
  40.                     @csrf
  41.                 </form>
  42.             @endcan
  43.  
  44.  
  45.                 @include('comments::components.comment.forms')
  46.                 <br>
  47.                 @foreach($comment->children as $child)
  48.                     @include('comments::components.comment.comment', [
  49.                             'comment' => $child,
  50.                             'reply' => false
  51.                         ])
  52.                 @endforeach
  53.  
  54.         </div>
  55.  
  56.     </div>
  57.  
  58.  
  59.  
  60.     {!! isset($reply) && $reply === true ? '</div>' : '</div>' !!}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement