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

[5.5] Allow developers to extend Relationship Classes #22617

Merged
merged 15 commits into from
Jan 3, 2018

Conversation

deleugpn
Copy link
Contributor

@deleugpn deleugpn commented Jan 2, 2018

This is a method-based alternative for #22382. With this PR, it's easy to extend relationship classes such as BelongsTo and HasMany by overriding the eloquent method that instantiates them.

Still incomplete because it requires a little bit of repetitive work. I was hoping to get a feedback (positive or negative) in whether I should finish this PR or not.

Thanks.

@deleugpn deleugpn changed the title [WIP] Allow developers to extend Relationship Classes [5.5] [WIP] Allow developers to extend Relationship Classes Jan 2, 2018
@deleugpn deleugpn changed the title [5.5] [WIP] Allow developers to extend Relationship Classes [5.5] Allow developers to extend Relationship Classes Jan 3, 2018
@deleugpn
Copy link
Contributor Author

deleugpn commented Jan 3, 2018

I believe this is ready for review.

@antonkomarev
Copy link
Contributor

I like this way much more, because it doesn't have any magic.

@taylorotwell taylorotwell merged commit f256ce1 into laravel:5.5 Jan 3, 2018
@deleugpn deleugpn deleted the eloquent branch January 3, 2018 16:23
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.

3 participants