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.
1 parent 675f892 commit 1b356deCopy full SHA for 1b356de
src/SettingsCasts/DateTimeInterfaceCast.php
@@ -8,6 +8,7 @@
8
use DateTimeImmutable;
9
use DateTimeInterface;
10
use Exception;
11
+use Illuminate\Support\Carbon as IlluminateCarbon;
12
13
class DateTimeInterfaceCast implements SettingsCast
14
{
@@ -32,6 +33,10 @@ public function get($payload): ?DateTimeInterface
32
33
return new CarbonImmutable($payload);
34
}
35
36
+ if ($this->type === IlluminateCarbon::class) {
37
+ return new IlluminateCarbon($payload);
38
+ }
39
+
40
if ($this->type === DateTimeImmutable::class) {
41
return new DateTimeImmutable($payload);
42
0 commit comments