{{ __('home.latest-comments') }}

@foreach ($latestComments as $comment) @php $isEpisode = $comment->commentable_type == \App\Models\Episode::class; if ($isEpisode) { $item = cache()->rememberForever( 'commentEpisode' . $comment->commentable_id, fn () => \App\Models\Episode::with('gallery') ->find($comment->commentable_id) ); $url = route('hentai.index', ['title' => $item->slug]); $title = $item->title . ' - ' . $item->episode; $thumbnail = $item->gallery->first()?->thumbnail_url ?? $item->cover_url; $cover = $item->cover_url; $resolution = $item->getResolution(); } else { $item = cache()->rememberForever( 'commentHentai' . $comment->commentable_id, fn () => \App\Models\Hentai::with('gallery', 'episodes') ->find($comment->commentable_id) ); $episode = $item->episodes->first(); $url = route('hentai.index', ['title' => $item->slug]); $title = $episode?->title; $thumbnail = $item->gallery->first()?->thumbnail_url ?? $episode?->cover_url; $cover = $episode?->cover_url; $resolution = $episode?->getResolution(); } @endphp
{{-- Thumbnail --}} {{-- Desktop Thumbnail --}} {{ $title }} {{-- Resolution Badge --}} {{ $resolution }} {{-- Gradient Overlay --}}

{{ $title }}

{{-- Comment Content --}}
@include('partials.comment', ['comment' => $comment])
@endforeach