I am testing Laravel with Algolia. Algolia limits the maximum number of search results to 1000. Which is fine by me, I guess.
My problem is that am not quite able to request 1000 search records from Algolia and then paginate. I tried:
$result = Model::search(request()->keywords)->take(1000)->paginate(50);
But I am still having Laravel provide more pages than the 20 that I should be having. It paginates for all the available records, if there are over 1000.
Any suggestions?