diff --git a/src/EncryptableTrait.php b/src/EncryptableTrait.php index 0cc8316..71b7506 100644 --- a/src/EncryptableTrait.php +++ b/src/EncryptableTrait.php @@ -15,7 +15,7 @@ trait EncryptableTrait public function getAttribute($key) { $value = parent::getAttribute($key); - if (in_array($key, $this->encryptable)) { + if (in_array($key, $this->encryptable) && $value !== '') { $value = decrypt($value); }