Skip to content

Commit 683d35e

Browse files
author
David Nahodyl
committed
added handling for writing boolean values as 1 and 0 instead of true and false
1 parent 179e009 commit 683d35e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Database/Eloquent/FMModel.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,11 @@ public function setAttribute($key, $value)
481481
$value = $this->castAttributeAsEncryptedString($key, $value);
482482
}
483483

484+
// FileMaker can't handle true and false, so we need to change to 1 and 0
485+
if (is_bool($value)){
486+
$value = $value ? 1 : 0;
487+
}
488+
484489
$this->attributes[$key] = $value;
485490

486491
return $this;

0 commit comments

Comments
 (0)