Support the ongoing development of Laravel.io →
Requests Input Database

In my project I want to create a small search engine (+-1000records needs to be searched).

First of all: I know Solr etc are built for what I want, but I think it's a bit overkill?

I have all records in a collection ($results). Now, I want to show the location in the sidebar: ($results->groupBy('Location')->get()). This is how I get my list.

But now, the problem is: how can I also paginate the collection $results without running that query twice?

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

ufeg02 ufeg02 Joined 25 Jul 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.