diff --git a/CHANGELOG.md b/CHANGELOG.md index 532de8a..4a7a670 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file. -------------- ### Fixed +- Fix type of hashed model property to `string` ### Changed diff --git a/src/Console/ModelsCommand.php b/src/Console/ModelsCommand.php index 8bdd55a..f2a4253 100644 --- a/src/Console/ModelsCommand.php +++ b/src/Console/ModelsCommand.php @@ -382,6 +382,7 @@ class ModelsCommand extends Command break; case 'decimal': case 'string': + case 'hashed': $realType = 'string'; break; case 'array': diff --git a/tests/Console/ModelsCommand/SimpleCasts/Models/SimpleCast.php b/tests/Console/ModelsCommand/SimpleCasts/Models/SimpleCast.php index b9ce9ae..ad81808 100644 --- a/tests/Console/ModelsCommand/SimpleCasts/Models/SimpleCast.php +++ b/tests/Console/ModelsCommand/SimpleCasts/Models/SimpleCast.php @@ -39,5 +39,6 @@ class SimpleCast extends Model 'cast_to_encrypted_collection' => 'encrypted:collection', 'cast_to_encrypted_json' => 'encrypted:json', 'cast_to_encrypted_object' => 'encrypted:object', + 'cast_to_hashed' => 'hashed', ]; } diff --git a/tests/Console/ModelsCommand/SimpleCasts/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/SimpleCasts/__snapshots__/Test__test__1.php index 257a55d..2258132 100644 --- a/tests/Console/ModelsCommand/SimpleCasts/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/SimpleCasts/__snapshots__/Test__test__1.php @@ -105,5 +105,6 @@ class SimpleCast extends Model 'cast_to_encrypted_collection' => 'encrypted:collection', 'cast_to_encrypted_json' => 'encrypted:json', 'cast_to_encrypted_object' => 'encrypted:object', + 'cast_to_hashed' => 'hashed', ]; }