@extends('backend.layout.template') @section('title') {{ $app_setting->meta_sub_title }} | {{ $app_setting->meta_sub_title }} admin comment list @endsection @section('content')

Posts comment

Posts comment Management.

@php $i=1 @endphp @foreach( $comments as $item) @php $name = $name = $item->type === 'user' ? optional($item->user)->name : optional($item)->name; @endphp @php $i++ @endphp @endforeach
ID Post titel Comment User Status Action
{{$i}} {{ optional($item->post)->name ?? '-N/A-' }} {{$item->comment}} {{$name}} @if( $item->status == 1) Publish @elseif($item->status == 2) Pending @endif
EDIT
@csrf
@endsection