Closed tkuijer closed 4 months ago
Is the pagination functionality used somewhere? In the regular builder it's only used by the paginate functions, but we have our own versions of those. I'm not sure this paginate functionality is going to work correctly as-is anyway.
Thanks for the merge! Love the package so far!
I'm not sure about consequences for the regular pagination, however Laravel Nova encountered errors with its pagination. Appears they use some more obscure eloquent features.
Ah. I haven't tried it with Nova. Does this get you the right value in there? It seems like it would need to hit the database to get that, and this isn't doing much at all.
This PR automatically corrects the sort order when using the
orderBy
query builder function. This is needed for compatibility with thelatest
andoldest
methods, which by default use 'asc' or 'desc' for their order.This also adds a
getCountForPagination
method override to return the correct FM count.Both improve compatibility with Laravel Nova.