@extends('admin.layout', ['menuKey' => 'blog-comments']) @section('title', 'Blog comments') @section('content')
Admin ยท Blog

Comments

@php $rows = $comments->getCollection()->map(fn ($c) => ['type' => 'comment', 'm' => $c, 'post' => $c->post])->concat($replies->map(fn ($r) => ['type' => 'reply', 'm' => $r, 'post' => $r->comment?->post])); @endphp @if ($rows->isEmpty())
Nothing here.
@else
@foreach ($rows as $row) @php $m = $row['m']; @endphp @endforeach
ReceivedFromCommentPost
{{ $m->created_at?->format('M j, g:i A') }}@if ($row['type'] === 'reply')
Reply@endif
{{ $m->name }}
{{ $m->email }}
{{ $m->comment }} @if ($row['post']){{ Str::limit($row['post']->blog_title, 60) }}@endif @foreach (['approved' => 'Approve', 'rejected' => 'Reject', 'delete' => 'Delete'] as $action => $label) @continue($action === $status)
@csrf
@endforeach
{{ $comments->links('pagination::simple-default') }} @endif @endsection