sngrl / sphinxsearch

Sphinx Search for Laravel 5
MIT License
124 stars 89 forks source link

using pagination #33

Open dingman opened 7 years ago

dingman commented 7 years ago

So it seems there is not built in pagination, I'm trying to build my own.

That said, when I use ->query() it gives me the total_count number I need. But when I use ->get() it gives me the model I want (with the relations), but no total count so I can't paginate properly.

Is there a way to get the total count while using get()?

devilcius commented 6 years ago

I do it using Illuminate\Pagination\LengthAwarePaginator. Check this SO answer.