Enable NULLs in LeenooksCarbon cast
This commit is contained in:
parent
eaece2b69d
commit
8acc3a91af
@ -13,9 +13,9 @@ class LeenooksCarbon implements CastsAttributes
|
|||||||
*
|
*
|
||||||
* @param array<string, mixed> $attributes
|
* @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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user