@extends('layouts.dashboard') @section('title', t('التعليقات','Comments')) @section('page-title','💬 '.t('إدارة التعليقات','Manage Comments')) @section('content')
{{ t('بانتظار المراجعة','Pending') }}
{{ $stats['pending'] }}
{{ t('منشور','Approved') }}
{{ $stats['approved'] }}
🚫
Spam
{{ $stats['spam'] }}
@foreach(['all'=>t('الكل','All'),'pending'=>t('انتظار','Pending'),'approved'=>t('منشور','Approved'),'spam'=>'Spam'] as $s=>$l) {{ $l }} @endforeach
@if($stats['pending'] > 0)
@csrf
@endif
@forelse($comments as $c)
{{ strtoupper(substr($c->name,0,1)) }}
{{ $c->name }} {{ $c->email }} {{ $c->status }} @if($c->post)📝 {{ $c->post->title_ar }}@endif {{ \Carbon\Carbon::parse($c->created_at)->diffForHumans() }}

{{ $c->content }}

@if($c->status !== 'approved')
@csrf
@endif @if($c->status !== 'spam')
@csrf
@endif
@csrf @method('DELETE')
@empty

{{ t('لا يوجد تعليقات','No comments') }}

@endforelse @if($comments->hasPages())
{{ $comments->withQueryString()->links() }}
@endif
@endsection