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.6] Use getter method for access primary key #23362

Merged
merged 1 commit into from
Mar 2, 2018

Conversation

mayoz
Copy link
Contributor

@mayoz mayoz commented Mar 1, 2018

No description provided.

@sisve
Copy link
Contributor

sisve commented Mar 2, 2018

What problem does this solve, and where are the tests for that problem?

@mayoz
Copy link
Contributor Author

mayoz commented Mar 2, 2018

You can't change the primaryKey value in traits, PHP does not allow this for now. But you can override with method. Also, Laravel tests getKeyName method in the DatabaseEloquentModelTest.php

@jmarcher
Copy link
Contributor

jmarcher commented Mar 2, 2018

What @sisve means is that you changed the getForeignKey method, those changes need to be tested.

Something like the use case you said could be tested.

@taylorotwell taylorotwell merged commit a35c52d into laravel:5.6 Mar 2, 2018
@mayoz mayoz deleted the patch-2 branch March 2, 2018 15:25
@GrahamCampbell GrahamCampbell changed the title Use getter method for access primary key [5.6] Use getter method for access primary key Mar 2, 2018
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