Fix parse issue.

This commit is contained in:
James Cole
2026-01-13 20:59:54 +01:00
parent 419c796eac
commit 7dcfb68fca
2 changed files with 5 additions and 2 deletions

View File

@@ -103,7 +103,7 @@ class AvailableBudget extends Model
protected function endDate(): Attribute
{
return Attribute::make(
get: Carbon::parse(...),
get: static fn (string $value): Carbon => Carbon::parse($value),
set: static fn (Carbon $value): string => $value->format('Y-m-d'),
);
}
@@ -111,7 +111,7 @@ class AvailableBudget extends Model
protected function startDate(): Attribute
{
return Attribute::make(
get: Carbon::parse(...),
get: static fn (string $value): Carbon => Carbon::parse($value),
set: static fn (Carbon $value): string => $value->format('Y-m-d'),
);
}

3
composer.lock generated
View File

@@ -13087,5 +13087,8 @@
"ext-xmlwriter": "*"
},
"platform-dev": {},
"platform-overrides": {
"php": "8.4"
},
"plugin-api-version": "2.9.0"
}