Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Revert "[8.x] Fix formatWheres in DatabaseRule (#36441)"
This reverts commit e3f48f7.
  • Loading branch information
taylorotwell authored Mar 3, 2021
commit 2172c6cba58aab785b1b27a754ea6cc8452229f7
6 changes: 1 addition & 5 deletions src/Illuminate/Validation/Rules/DatabaseRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,7 @@ public function queryCallbacks()
protected function formatWheres()
{
return collect($this->wheres)->map(function ($where) {
if (is_bool($where['value'])) {
return $where['column'].','.($where['value'] ? 'true' : 'false');
} else {
return $where['column'].','.'"'.str_replace('"', '""', $where['value']).'"';
}
return $where['column'].','.'"'.str_replace('"', '""', $where['value']).'"';
})->implode(',');
}
}