public function getEncryptedAttribute($attribute) { $value = array_get($this->attributes, $attribute); return $this->isEncrypted($attribute) ? $this->decrypt($value) : $value; }