Files
2026-07-24 10:30:36 +01:00

2 lines
1.2 KiB
PHP

<x-layouts.app :title="__('Comments')"><h1 class="mb-6 text-2xl font-semibold">Comment moderation</h1>@if(session('status'))<div class="mb-4 rounded border border-green-300 bg-green-50 p-3">{{ session('status') }}</div>@endif<div class="space-y-4">@forelse($records as $comment)<div class="rounded-xl border bg-white p-5"><div class="flex justify-between"><strong>{{ $comment->author_name }}</strong><span>{{ $comment->status }}</span></div><p class="my-3">{{ $comment->body }}</p><form method="POST" action="{{ route('administration.comments.update',$comment) }}" class="flex gap-3">@csrf @method('PUT')<select name="status" class="rounded border"><option>pending</option><option @selected($comment->status==='approved')>approved</option><option @selected($comment->status==='spam')>spam</option><option @selected($comment->status==='rejected')>rejected</option></select><input name="moderation_notes" value="{{ $comment->moderation_notes }}" class="flex-1 rounded border" placeholder="Moderation notes"><flux:button type="submit">Update</flux:button></form></div>@empty<p>No comments awaiting moderation.</p>@endforelse</div><div class="mt-4">{{ $records->links() }}</div></x-layouts.app>