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.8] Change visibility to public for hasPivotColumn method by pactode #29367

Merged
merged 1 commit into from
Aug 1, 2019
Merged

Conversation

pactode
Copy link
Contributor

@pactode pactode commented Aug 1, 2019

I was trying to do a check of whether a relation contains a specific pivot column. This is currently not possible. In order to fix this I suggest changing the visibility to public.

Example of usage:

$relation = $model->somePivotRelation();

if ($relation->hasPivotColumn('position')) {
    // build a specific query containing that attribute
}

Let me know what you think about this.

@taylorotwell taylorotwell merged commit 4c79a8a into laravel:5.8 Aug 1, 2019
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