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 1 commit into from Aug 1, 2019


Copy link

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

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
continuous-integration/styleci/pr The analysis has passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.