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

feat: allow limiting ToMany relationships #102

Closed
wants to merge 2 commits into from

Conversation

SychO9
Copy link
Contributor

@SychO9 SychO9 commented Feb 28, 2024

The https://github.com/staudenmeir/eloquent-eager-limit package allows limiting relationship results, Laravel 11 will officially support this: laravel/framework#49695.

This PR adds support for the feature, allowing ToMany relationships to be limited by simply passing ->limit(6), this is especially useful when all that's needed is a subset of results, which is a great performance improvement.

@SychO9
Copy link
Contributor Author

SychO9 commented Mar 1, 2024

hmm, would be smarter to just allow constraining the query. #103

@SychO9 SychO9 closed this Mar 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

Successfully merging this pull request may close these issues.

1 participant