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] Fix insertOrIgnore() and insertUsing() as Eloquent queries #29645

Merged
merged 1 commit into from Aug 20, 2019

Conversation

@staudenmeir
Copy link
Contributor

commented Aug 20, 2019

When being called as an Eloquent query, insertOrIgnore() and insertUsing() return the query builder instead of the actual result (number of affected rows / success):

User::insertOrIgnore(['foo' => 'bar']);

User::insertUsing(['foo'], "select 'bar'");

@taylorotwell taylorotwell merged commit b449e0e into laravel:5.8 Aug 20, 2019

2 checks passed

continuous-integration/styleci/pr The analysis has passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@staudenmeir staudenmeir deleted the staudenmeir:eloquent-insert branch Aug 20, 2019

@tw99

This comment has been minimized.

Copy link
Contributor

commented Aug 21, 2019

@staudenmeir With the addition of insertOrIgnore does that mean Laravel would accept a PR for upsert?

@staudenmeir

This comment has been minimized.

Copy link
Contributor Author

commented Aug 21, 2019

@tw99 Please ask Taylor about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.