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

[8.x] Eager load pivot relations #38157

Closed
wants to merge 2 commits into from

Conversation

lonnylot
Copy link
Contributor

This allows you to use protected $with = []; on custom pivot models.

Since Pivot classes are Model classes we're just adding in this missing bit of functionality.

@GrahamCampbell GrahamCampbell changed the title Eager load pivot relations [8x. ]Eager load pivot relations Jul 27, 2021
@GrahamCampbell GrahamCampbell changed the title [8x. ]Eager load pivot relations [8.x] Eager load pivot relations Jul 27, 2021
@ajcastro
Copy link

Putting this here for reference, #37456

@taylorotwell
Copy link
Member

Thanks for your pull request to Laravel!

Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.

If possible, please consider releasing your code as a package so that the community can still take advantage of your contributions!

If you feel absolutely certain that this code corrects a bug in the framework, please "@" mention me in a follow-up comment with further explanation so that GitHub will send me a notification of your response.

@lonnylot
Copy link
Contributor Author

@ajcastro Would you consider adding this support to your ajcastro/eager-load-pivot-relations package? If so, I can make a PR.

@ajcastro
Copy link

ajcastro commented Aug 8, 2021

@lonnylot yes please thanks!

@erikn69
Copy link
Contributor

erikn69 commented Aug 27, 2021

@ajcastro is there a way to do something like #37830 on your package? can I make a PR for that?

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.

4 participants