with cast tests
This commit is contained in:
parent
afb47c1977
commit
3a26a2e0c2
8 changed files with 154 additions and 3 deletions
|
|
@ -7,7 +7,7 @@ use Illuminate\Support\Carbon;
|
|||
|
||||
class CarbonPeriodMapper
|
||||
{
|
||||
public function map(mixed $value): CarbonPeriodImmutable
|
||||
public function cast(mixed $value): CarbonPeriodImmutable
|
||||
{
|
||||
return new CarbonPeriodImmutable(Carbon::parse($value['start']), Carbon::parse($value['end']));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue