I need to skip the first n records, say 5 from a table and paginate the rest of it. The following is the code that i am using.
$skipNewsListArr = array(1,2,3,4,5); $wrongPaginationLinks = DB::table('news') ->whereNotIn('news_id',$skipNewsListArr) ->orderBy('news_date','desc') ->paginate(5);
But the above code outputs the pagination links corresponding to the whole table. How can i achieve pagination by skipping records based on some condition.