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.
2 parents 6332eb2 + 5fa9d73 commit 38ffe8bCopy full SHA for 38ffe8b
src/Database/Eloquent/Concerns/FMHasAttributes.php
@@ -35,7 +35,7 @@ public function setAttribute($key, $value)
35
}
36
// When writing dates the regular datetime format won't work, so we have to get JUST the date value
37
// check the key's cast to see if it is cast to a date or custom date:format
38
- $castType = $this->getCasts()[$key] ?? null;
+ $castType = $this->getCasts()[$key] ?? '';
39
$isDate = $castType == "date" || str_starts_with($castType, 'date:');
40
if ($isDate) {
41
$value = Arr::first(explode(' ', $value));
@@ -56,4 +56,4 @@ public function setAttribute($key, $value)
56
return $this;
57
58
59
-}
+}
0 commit comments