Skip to content
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

Select aggregate function result over relationship #442

Open
hrach opened this issue Aug 3, 2020 · 0 comments
Open

Select aggregate function result over relationship #442

hrach opened this issue Aug 3, 2020 · 0 comments

Comments

@hrach
Copy link
Member

hrach commented Aug 3, 2020

Currently we are able to use aggregation function to select / sort results. There is also one aggregation function allowing to select -> count(stored)(). However, user is not able to select aggregation over relationships. We should add a method which will allow to fetch aggregation result from collection.

$user->books->toCollection()->getAggregation([ArgAggregateFunction::class, [YearFunction::class, 'publishedAt']]);

(YearFunction does not exists)

@hrach hrach added the feature label Aug 3, 2020
@hrach hrach removed the feature label Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant