aarondfrancis / fast-paginate

A fast implementation of offset/limit pagination for Laravel.
MIT License
1.21k stars 56 forks source link

Does not respect the model's collection class #50

Closed andrewtweber closed 1 year ago

andrewtweber commented 1 year ago

First of all, a little strange that it returns an Illuminate\Support\Collection instead of Illuminate\Database\Eloquent\Collection. Is there a reason for that?

But also, if you set a custom collection by overriding a model's newCollection method, it should use that collection class instead.

I'll work on a fork if I have time, thanks for the package

aarondfrancis commented 1 year ago

Fixed in https://github.com/hammerstonedev/fast-paginate/pull/38.