@php use Illuminate\Support\Str; @endphp @extends('admin.layouts.app') @section('title', __('admin.content_comments')) @section('heading', __('admin.content_comments')) @section('content')
{{ __('admin.cancel') }}
@csrf @method('delete')
@can(\App\Models\Permission::COMMENTS_MODERATE) @endcan
@forelse ($comments as $comment) @php $sourceUrl = $comment->adminSourceUrl(); @endphp @empty @endforelse
{{ __('admin.user') }} {{ __('admin.comment_source') }} {{ __('admin.body') }} {{ __('admin.status') }} {{ __('admin.created_at') }} {{ __('admin.actions') }}
{{ $comment->user?->name ?? $comment->user?->mobile }}
@if ($comment->parent_id)

{{ __('admin.comment_reply_to', ['name' => $comment->parent?->user?->name ?? '#'.$comment->parent_id]) }}

@endif
{{ $comment->typeLabel() }}
@if ($sourceUrl) {{ $comment->sourceTitle() }} @else {{ $comment->sourceTitle() }} @endif
{{ Str::limit($comment->body, 80) }} {{ $comment->is_approved ? __('admin.approved') : __('admin.pending') }} @can(\App\Models\Permission::COMMENTS_MODERATE) @if (! $comment->is_approved)
@csrf @method('patch')
@csrf @method('delete')
@endif @endcan
{{ __('admin.no_records') }}
{{ $comments->links() }}
@endsection