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

[10.x] Add getForeignKeyFrom method #47378

Merged
merged 2 commits into from
Jun 8, 2023
Merged

[10.x] Add getForeignKeyFrom method #47378

merged 2 commits into from
Jun 8, 2023

Conversation

iamgergo
Copy link
Contributor

@iamgergo iamgergo commented Jun 8, 2023

This PR adds the getForeignKeyFrom() method to the BelongsTo relation.

This is useful when having a custom relationship that extends the belongs to relation. Overriding this method we can have our own foreign key resolution logic. (There was already a getRelatedKeyFrom method I guess for the same reason).

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.

2 participants