I want to get the latest posts based by vote counts but i want it to ignore the first 3 rows because i am already showing those 3 records
$popularPosts = Post::query()
->leftJoin('upvote_downvotes', 'post_id', '=', 'upvote_downvotes.post_id')
->select('posts.*', DB::raw('COUNT(upvote_downvotes.id) as upvote_count'))
->where(function($query) {
$query->whereNull('upvote_downvotes.is_upvote')
->orWhere('upvote_downvotes.is_upvote', '=', 1);
})
->where('active', '=', 1)
->where('published_at', '<', Carbon::now())
->orderByDesc('upvote_count')
->groupBy('posts.id')
->skip(3)
->limit(5)
->get();
this is how im displaying them
<article class="mx-auto px-4 bg-white dark:bg-zinc-900 shadow-md py-3">
<div class="md:flex-col w-full">
<div class="flex-col md:col-span-4 flex">
@foreach($popularPost->categories as $category)
<a href="category/{{ $category->slug }}" class="text-red-600 font-bold uppercase">
{{ $category->title }}
</a>
@endforeach
<a href="{{ route('view', $popularPost) }}">
<h3 class="text-lg dark:text-gray-200 dark:hover:text-red-600 hover:text-red-600 transition ease-out">
{{$popularPost->title}}
</h3>
</a>
<!-- <p>
{{ $popularPost->getFormattedDate() }} | {{ $popularPost->human_read_Time }}
</p> -->
</div>
</div>
</article> <!-- latest news end -->
how can i do it? the part where it says orderByDesc('upvote_count') is arranging the records by vote count but it is currently showing posts from the first 2 rows on my posts table.