@if ($comments->firstWhere('post_id',$post->id))
@if ($comments->firstWhere('post_id',$post->id)->image) Logo @else Logo @endif
{{ $comments->firstWhere('post_id',$post->id)->first_name.' '.$comments->firstWhere('post_id',$post->id)->last_name}} {{ $comments->firstWhere('post_id',$post->id)->created_at->diffForHumans() }}
@if (Str::length($comments->firstWhere('post_id',$post->id)->body) > 300) {{ Str::limit($comments->firstWhere('post_id',$post->id)->body,300,'...') }} {{ $comments->firstWhere('post_id',$post->id)->body }} firstWhere('post_id',$post->id)->id }}> show more @else {{ $comments->firstWhere('post_id',$post->id)->body }} @endif @if ($comment_attachments->where('comment_id',$comments->firstWhere('post_id',$post->id)->id)->count() > 0)
@foreach ($comment_attachments->where('comment_id',$comments->firstWhere('post_id',$post->id)->id) as $key=>$attachment)
@endforeach
@endif @if (auth()->id() == $comments->firstWhere('post_id',$post->id)->user_id || auth()->user()->hasRole('ROLE_TEACHER') || auth()->user()->hasRole('ROLE_ADMIN'))
firstWhere('post_id',$post->id)->id }} post-id={{ $post->id }}>Delete {{-- Edit --}}
@endif
@if ($post->comments_count > 1 ) Show {{ $post->comments_count - 1 }} More @endif @else
No Comments Yet
@endif @if ($post->comments_count > 1 )
@foreach ($comments->where('post_id',$post->id) as $comment) @continue($loop->first) @php $audio_attachments= $post_attachments->where('post_id',$post->id)->whereIn('type',['wav','mp3']); @endphp
@if ($comment->image) Logo @else Logo @endif
{{ $comment->first_name.' '.$comment->last_name }} {{ $comment->created_at->diffForHumans() }}
@if (Str::length($comment->body) > 300) {{ Str::limit($comment->body,300,'...') }} {{ $comment->body }} id }}> show more @else {{ $comment->body }} @endif @if ($comment_attachments->where('comment_id',$comment->id)->count() > 0) @php $image_attachments= $comment_attachments->where('comment_id',$comment->id)->whereIn('type',['png','jpg','gif','jpeg','svg','jfif']); $image_count= $image_attachments->count(); $file_attachments= $comment_attachments->where('comment_id',$comment->id)->whereNotIn('type',['png','jpg','gif','jpeg','svg','jfif','wav','mp3']); $audio_attachments= $comment_attachments->where('comment_id',$comment->id)->whereIn('type',['wav','mp3']); @endphp
@foreach ($audio_attachments as $key=>$attachment)
@endforeach
@endif @if (auth()->id() == $comment->user_id || auth()->user()->hasRole('ROLE_TEACHER') || auth()->user()->hasRole('ROLE_ADMIN'))
id }} post-id={{ $post->id }}>Delete {{-- Edit --}}
@endif
@endforeach
@endif
{{-- processing record spinner --}}
Processing record
    recording ...
    @if (auth()->user()->image) Logo @else Logo @endif