Misc changes
This commit is contained in:
@@ -47,7 +47,7 @@ class Comments extends Component
|
|||||||
->with('user', 'children.user', 'children.children')
|
->with('user', 'children.user', 'children.children')
|
||||||
->parent()
|
->parent()
|
||||||
->latest()
|
->latest()
|
||||||
->paginate(3);
|
->paginate(50);
|
||||||
|
|
||||||
return view('livewire.comments', [
|
return view('livewire.comments', [
|
||||||
'comments' => $comments
|
'comments' => $comments
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<div class="grid grid-cols-1 gap-2 md:grid-cols-2">
|
<div class="grid grid-cols-1 gap-2 md:grid-cols-2">
|
||||||
@foreach ($latestComments as $comment)
|
@foreach ($latestComments as $comment)
|
||||||
@if ($comment->commentable_type == 'App\Models\Episode')
|
@if ($comment->commentable_type == \App\Models\Episode::class)
|
||||||
@php $episode = cache()->rememberForever('commentEpisode'.$comment->commentable_id, fn () => App\Models\Episode::with('gallery')->where('id', $comment->commentable_id)->first()); @endphp
|
@php $episode = cache()->rememberForever('commentEpisode'.$comment->commentable_id, fn () => App\Models\Episode::with('gallery')->where('id', $comment->commentable_id)->first()); @endphp
|
||||||
<div id="comments" class="flex p-4 bg-white rounded-lg dark:bg-neutral-950">
|
<div id="comments" class="flex p-4 bg-white rounded-lg dark:bg-neutral-950">
|
||||||
<div
|
<div
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
{{--@include('partials.comment', ['comment' => $comment])--}}
|
{{--@include('partials.comment', ['comment' => $comment])--}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@elseif($comment->commentable_type == 'App\Models\Hentai')
|
@elseif($comment->commentable_type == \App\Models\Hentai::class)
|
||||||
@php $hentai = cache()->rememberForever('commentHentai'.$comment->commentable_id, fn () => App\Models\Hentai::with('gallery', 'episodes')->where('id', $comment->commentable_id)->first()); @endphp
|
@php $hentai = cache()->rememberForever('commentHentai'.$comment->commentable_id, fn () => App\Models\Hentai::with('gallery', 'episodes')->where('id', $comment->commentable_id)->first()); @endphp
|
||||||
<div id="comments" class="flex p-4 bg-white rounded-lg dark:bg-neutral-950">
|
<div id="comments" class="flex p-4 bg-white rounded-lg dark:bg-neutral-950">
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
@foreach($comments as $comment)
|
@foreach($comments as $comment)
|
||||||
<livewire:comment :comment="$comment" :key="$comment->id"/>
|
<livewire:comment :comment="$comment" :key="$comment->id"/>
|
||||||
@endforeach
|
@endforeach
|
||||||
{{ $comments->links() }}
|
{{ $comments->links('pagination::tailwind') }}
|
||||||
@else
|
@else
|
||||||
<p class="text-gray-900 dark:text-gray-200">No comments yet.</p>
|
<p class="text-gray-900 dark:text-gray-200">No comments yet.</p>
|
||||||
@endif
|
@endif
|
||||||
|
|||||||
Reference in New Issue
Block a user