Comment
@foreach ($comments as $comment)
@if($comment->commentable_type == \App\Models\Episode::class) @php $episode = \App\Models\Episode::find($comment->commentable_id); @endphp @elseif($comment->commentable_type == \App\Models\Hentai::class) @php $hentai = \App\Models\Hentai::find($comment->commentable_id); $episode = $hentai->episodes->first(); @endphp @endif
{!! $comment->presenter()->markdownBody() !!}
{{ $comment->presenter()->relativeCreatedAt() }}
@endforeach
{{ $comments->links('pagination::tailwind') }}