add immutable_date/time:* casts (#1380)

* add immutable_date/time:* casts

* fix style

* Update CHANGELOG.md

---------

Co-authored-by: Barry vd. Heuvel <[email protected]>
Co-authored-by: Barry vd. Heuvel <[email protected]>
This commit is contained in:
Konstantin Duczek
2023-02-20 09:36:24 +01:00
committed by GitHub
co-authored by Barry vd. Heuvel Barry vd. Heuvel
parent 9f97f7cd5f
commit b70a9f5048
5 changed files with 17 additions and 0 deletions
+4
View File
@@ -369,6 +369,10 @@ class ModelsCommand extends Command
$type = 'date';
} elseif (Str::startsWith($type, 'immutable_custom_datetime:')) {
$type = 'immutable_date';
} elseif (Str::startsWith($type, 'immutable_date:')) {
$type = 'immutable_date';
} elseif (Str::startsWith($type, 'immutable_datetime:')) {
$type = 'immutable_datetime';
} elseif (Str::startsWith($type, 'encrypted:')) {
$type = Str::after($type, ':');
}