Laporan Tanggapan Laporan Detail @if($post)
{{--KIRI: Detail Laporan --}} @if($post->images->count())
@foreach($post->images as $image) Image @endforeach
@if($post->images->count() > 1) {{-- Tombol navigasi kiri-kanan --}} @endif
@endif

{{ $post->created_at?->diffForHumans() ?? '-'}}

{{ $post->post }}

@if(count($post->rating)>0)

Rating Tanggapan Laporan

@php $rating = $post->rating[0]->rating ?? 0; $maxRating = 5; @endphp @for ($i = 1; $i <= $maxRating; $i++) @endfor

Rating: {{ $rating }} / 5

{{ $post->rating[0]->comment }}

@endif
{{--KANAN: Komentar --}}

Komentar

{{-- Form Komentar --}}
@if($fileAttach) @php $ext = pathinfo($fileAttach->getClientOriginalName(), PATHINFO_EXTENSION); @endphp @if(strtolower($ext) !== 'pdf') @endif @elseif($file) @endif {{-- Daftar Komentar --}}
@forelse($post->comment as $c)
{{-- Avatar User --}} {{ $c->user->name }} {{-- Komentar --}}

{{ $c->user->name }}

{{ $c->comment }}

@if ($c->file) @if(Str::endsWith($c->file, ['.jpg', '.jpeg', '.png'])) Attachment @elseif(Str::endsWith($c->file, ['.pdf'])) Lihat PDF @endif @endif

{{ $c->created_at?->diffForHumans() ?? '-' }}

@empty

Belum ada komentar.

@endforelse
@endif @push('styles') @endpush @push('scripts') @endpush