You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've just implemented Scout on an API I've been building. I'm using Fractal by the PHP League which has baked in support for Laravel pagination using \Illuminate\Pagination\LengthAwarePaginator.
In addition to retrieving a collection of models, you may paginate your search results using the paginate method. This method will return a Paginator instance just as if you had paginated a traditional Eloquent query.
However, Scout returns an instance of Illuminate\Pagination\Paginator where as Eloquent returns an instance of \Illuminate\Pagination\LengthAwarePaginator. Before I spend too much effort on this, is there any reason why Scout returns a different type of paginator to Eloquent? This seems a bit like an issue since the documentation suggests that it's pagination should be the same as Eloquent's.
The text was updated successfully, but these errors were encountered:
I've just implemented Scout on an API I've been building. I'm using Fractal by the PHP League which has baked in support for Laravel pagination using
\Illuminate\Pagination\LengthAwarePaginator
.The documentation for Scout states the following (https://laravel.com/docs/5.3/scout#pagination):
However, Scout returns an instance of
Illuminate\Pagination\Paginator
where as Eloquent returns an instance of\Illuminate\Pagination\LengthAwarePaginator
. Before I spend too much effort on this, is there any reason why Scout returns a different type of paginator to Eloquent? This seems a bit like an issue since the documentation suggests that it's pagination should be the same as Eloquent's.The text was updated successfully, but these errors were encountered: