fix(ModelsCommand): use 'string' as realType for 'encrypted' casts (#1698)

This commit is contained in:
Pieter Willekens
2025-07-17 08:06:36 +02:00
committed by GitHub
parent 108f6269c1
commit fafe264b3c
3 changed files with 3 additions and 5 deletions
+1 -3
View File
@@ -410,9 +410,6 @@ class ModelsCommand extends Command
$params = [];
switch ($type) {
case 'encrypted':
$realType = 'mixed';
break;
case 'boolean':
case 'bool':
$realType = 'bool';
@@ -420,6 +417,7 @@ class ModelsCommand extends Command
case 'decimal':
$realType = 'numeric';
break;
case 'encrypted':
case 'string':
case 'hashed':
$realType = 'string';
@@ -22,7 +22,7 @@ use Illuminate\Database\Eloquent\Model;
* @property \Carbon\CarbonImmutable $cast_to_immutable_custom_datetime
* @property \Carbon\CarbonImmutable $cast_to_immutable_datetime
* @property int $cast_to_timestamp
* @property mixed $cast_to_encrypted
* @property string $cast_to_encrypted
* @property array<array-key, mixed> $cast_to_encrypted_array
* @property \Illuminate\Support\Collection<array-key, mixed> $cast_to_encrypted_collection
* @property array<array-key, mixed> $cast_to_encrypted_json
@@ -33,7 +33,7 @@ use Illuminate\Database\Eloquent\Model;
* @property \Carbon\CarbonImmutable $cast_to_immutable_datetime
* @property \Carbon\CarbonImmutable $cast_to_immutable_datetime_serialization
* @property int $cast_to_timestamp
* @property mixed $cast_to_encrypted
* @property string $cast_to_encrypted
* @property array<array-key, mixed> $cast_to_encrypted_array
* @property \Illuminate\Support\Collection<array-key, mixed> $cast_to_encrypted_collection
* @property array<array-key, mixed> $cast_to_encrypted_json