Skip to content

Commit

Permalink
Merge pull request #624 from jgile/feature/updateorcreate
Browse files Browse the repository at this point in the history
updateOrCreate validation
  • Loading branch information
eullercdr authored Aug 30, 2019
2 parents 881308f + 7c971c5 commit 22d1ef9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Prettus/Repository/Eloquent/BaseRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ public function updateOrCreate(array $attributes, array $values = [])
$this->applyScope();

if (!is_null($this->validator)) {
$this->validator->with($attributes)->passesOrFail(ValidatorInterface::RULE_UPDATE);
$this->validator->with(array_merge($attributes, $values))->passesOrFail(ValidatorInterface::RULE_CREATE);
}

$temporarySkipPresenter = $this->skipPresenter;
Expand Down

0 comments on commit 22d1ef9

Please sign in to comment.