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

@foreach ($latestComments as $comment) @if ($comment->commentable_type == 'App\Models\Episode') @php $episode = cache()->rememberForever('commentEpisode'.$comment->commentable_id, fn () => App\Models\Episode::with('gallery')->where('id', $comment->commentable_id)->first()); @endphp
@include('partials.comment', ['comment' => $comment])
@elseif($comment->commentable_type == 'App\Models\Hentai') @php $hentai = cache()->rememberForever('commentHentai'.$comment->commentable_id, fn () => App\Models\Hentai::with('gallery', 'episodes')->where('id', $comment->commentable_id)->first()); @endphp
@include('partials.comment', ['comment' => $comment])
@endif @endforeach