-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add pagination for queries using havings #540
Conversation
https://github.com/justbetter/laravel-pagination-with-havings |
I tested with public function scopeClosed($obQuery)
{
return $obQuery->withCount(['orders', 'items'])
->having('orders_count', '=', \DB::raw('items_count'));
} |
Looks like it was added directly to Laravel in 7.x. Would be better to use that version as a base instead: laravel/framework#32624. Also, looks like @acasar had the solution all along, great job man! :) |
This version was merged, the other one had errors: |
Now I need to add the change to |
@alvaro-canepa can you test this new implementation to make sure it still work as expected? |
@alvaro-canepa did you get a chance to test this? |
This pull request will be closed and archived in 3 days, as there has been no activity in the last 60 days. |
please keep active. |
@mjauvin Sorry, I haven't had a chance to try it yet! |
Apply Laravel 7.x PR to fix this:
ref. laravel/framework#32688
Thanks to @alvaro-canepa and @acasar for this!