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

Feature/snake case relationships #602

Merged
merged 6 commits into from
Oct 6, 2019
Merged

Feature/snake case relationships #602

merged 6 commits into from
Oct 6, 2019

Conversation

Jhnbrn90
Copy link

@Jhnbrn90 Jhnbrn90 commented Oct 2, 2019

fixes #499

Addressing issue #499

snake_cased relationship definitions within $logAttributes are now handled correctly.

John Braun added 4 commits October 2, 2019 12:05
In order to test correct behaviour of "snake case" defined relationships, we need a relationship which can be snake cased in this test model.
Copy link
Collaborator

@Gummibeer Gummibeer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking care! 😊
Have some questions added.

src/Traits/DetectsChanges.php Outdated Show resolved Hide resolved
tests/Models/Article.php Outdated Show resolved Hide resolved
John Braun added 2 commits October 2, 2019 14:03
Since already camelized strings are not modified, we could leverage the Str::camel helper in any case and remove the unnecessary conditional, checking if the source string is in camel case.
Renamed the relationship SnakeUser() to snakeUser() and moved to the anonymous class within the test.
@Jhnbrn90
Copy link
Author

Jhnbrn90 commented Oct 2, 2019

Thanks for taking care! 😊
Have some questions added.

Happy to help out this Hacktober 😉 I hope to have addressed your points in my latest commits to this PR.

@Gummibeer
Copy link
Collaborator

Thanks for changing it! 💙
Will merge it during this week. 😊

@Jhnbrn90
Copy link
Author

Jhnbrn90 commented Oct 2, 2019

Thanks for changing it! 💙
Will merge it during this week. 😊

👍

@Gummibeer Gummibeer added enhancement hacktoberfest https://hacktoberfest.digitalocean.com labels Oct 4, 2019
@Gummibeer Gummibeer merged commit a63f6c3 into spatie:master Oct 6, 2019
@Gummibeer
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement hacktoberfest https://hacktoberfest.digitalocean.com
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow passing snake_case in "getRelatedModelAttributeValue"
2 participants