diff --git a/src/Illuminate/Validation/Rules/DatabaseRule.php b/src/Illuminate/Validation/Rules/DatabaseRule.php index b8113b2afadb..88b4d27cd941 100644 --- a/src/Illuminate/Validation/Rules/DatabaseRule.php +++ b/src/Illuminate/Validation/Rules/DatabaseRule.php @@ -196,7 +196,11 @@ public function queryCallbacks() protected function formatWheres() { return collect($this->wheres)->map(function ($where) { - return $where['column'].','.'"'.str_replace('"', '""', $where['value']).'"'; + if (is_bool($where['value'])) { + return $where['column'].','.($where['value'] ? 'true' : 'false'); + } else { + return $where['column'].','.'"'.str_replace('"', '""', $where['value']).'"'; + } })->implode(','); } }