Lets say I have a table users with 1000 records. I want to get the latest 100 users, but paginate them by 10 each. I tried both Users::latest()->take(100)->paginate(10) and Users::latest()->limit(100)->paginate(10) , but they didn't work as expected.
I wanted the pagination to have 10 pages total (100 users) but it still gives 100 total pages.