@extends('admin.layouts.admin') @section('title', 'Blog · Comentarios') @php $sBadge = ['pending' => 'badge-warn', 'approved' => 'badge-active', 'spam' => 'badge-secondary']; @endphp @section('content')
Comentarios

Modera los comentarios antes de que aparezcan.

@foreach(['' => 'Todos', 'pending' => 'Pendientes', 'approved' => 'Aprobados', 'spam' => 'Spam'] as $k => $v) {{ $v }}@if($k === 'pending' && $pendingCount) ({{ $pendingCount }})@endif @endforeach
@if($comments->isEmpty())
Sin comentarios
@else @foreach($comments as $c)
{{ $c->author_name }} {{ $c->author_email }} {{ $c->status }} @if($c->parent_id)respuesta@endif
{{ $c->created_at->format('d/m/Y H:i') }}
{{ \Illuminate\Support\Str::limit($c->body, 280) }}
en: {{ $c->post?->title ?? '—' }}
@if($c->status !== 'approved')
@csrf @method('PUT')
@endif @if($c->status !== 'spam')
@csrf @method('PUT')
@endif
@csrf @method('DELETE')
@endforeach
{{ $comments->links() }}
@endif
@endsection