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.5] Add support for additional values in relationship firstOrCreate and firstOrNew #18878

Merged
merged 1 commit into from
Apr 24, 2017

Conversation

mickeyschwab
Copy link
Contributor

Builder firstOrCreate and firstOrNew accepts a $values parameter to immediately merge in default values when returning a new model. This PR adds the same functionality to hasOneOrMany and MorphOneOrMany relationships.

I wasn't sure what to do regarding the signature change on belongsToMany (firstOrCreate(array $attributes, array $joining = [], $touch = true)) so I've held off for now but am happy to make the same changes for that relationship.

…hasOneOrMany and MorphOneOrMany relationships
@mickeyschwab mickeyschwab changed the title Add support for additional values in relationhip firstOrCreate and firstOrNew Add support for additional values in relationship firstOrCreate and firstOrNew Apr 19, 2017
@tillkruss tillkruss changed the title Add support for additional values in relationship firstOrCreate and firstOrNew [5.5] Add support for additional values in relationship firstOrCreate and firstOrNew Apr 19, 2017
@taylorotwell taylorotwell merged commit 5cb3099 into laravel:master Apr 24, 2017
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.

None yet

2 participants