Compare commits

..

1 Commits

Author SHA1 Message Date
8acc3a91af Enable NULLs in LeenooksCarbon cast 2024-07-31 22:40:35 +10:00

View File

@@ -13,9 +13,9 @@ class LeenooksCarbon implements CastsAttributes
*
* @param array<string, mixed> $attributes
*/
public function get(Model $model, string $key, mixed $value, array $attributes): Carbon
public function get(Model $model, string $key, mixed $value, array $attributes): ?Carbon
{
return Carbon::create($value);
return $value ? Carbon::create($value) : NULL;
}
/**