Skip to content

Conversation

@iamgergo
Copy link
Contributor

This is a followup of #52239.

As is turns it's possible to pass a flat array to the upsert method, not only nested arrays.

This PR makes sure using the upsert method with flat arrays on a relation, works.

I used the ! is_array(reset($values)) check for nested arrays, because the query builder's upsert method does the same.

Also updated the tests.

@taylorotwell taylorotwell merged commit 440ccb0 into laravel:11.x Jul 29, 2024
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