We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9acd088 commit 2a9d836Copy full SHA for 2a9d836
src/Eloquent/Model.php
@@ -243,9 +243,9 @@ public function setAttribute($key, $value)
243
$castOptions = Str::after($casts[$key], ':');
244
245
// Can add more native mongo type casts here.
246
- $value = match (true) {
247
- $castType === 'decimal' => $this->fromDecimal($value, $castOptions),
248
- default => $value,
+ $value = match ($castType) {
+ 'decimal' => $this->fromDecimal($value, $castOptions),
+ default => $value,
249
};
250
}
251
0 commit comments