Replies: 2 comments
-
|
We have no plans for that, but feel free to submit PRs. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
This is coming in the next major version (v7) of the package. You will be able to use aggregate includes like this: QueryBuilder::for(User::class)
->allowedIncludes([
AllowedInclude::min("postsViewsMin", "posts", "views"),
AllowedInclude::max("postsViewsMax", "posts", "views"),
AllowedInclude::sum("postsViewsSum", "posts", "views"),
AllowedInclude::avg("postsViewsAvg", "posts", "views"),
]);The suffixes ( Docs will be available at https://spatie.be/docs/laravel-query-builder/v7/features/including-relationships once v7 is released. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Any plans to implement the other aggregate functions in the allowedIncludes?
https://laravel.com/docs/9.x/eloquent-relationships#other-aggregate-functions
Beta Was this translation helpful? Give feedback.
All reactions