protected function doEncryptAttribute($key)
    {
        if ($this->shouldEncrypt($key) && ! $this->isEncrypted($this->attributes[$key])) {
            try {
                $this->attributes[$key] = $this->encryptedAttribute($this->attributes[$key]);
            } catch (EncryptException $e) {
            }
        }
    }
protected function doEncryptAttribute($key)
    {
        if ($this->shouldEncrypt($key) && ! $this->isEncrypted($this->attributes[$key])) {
            try {
                $this->attributes[$key] = $this->encryptedAttribute($this->attributes[$key]);
            } catch (EncryptException $e) {
            }
        }
    }
protected function doEncryptAttribute ( $ key ) { if ( $ this -> shouldEncrypt ( $ key ) && ! $ this -> isEncrypted ( $ this -> attributes [ $ key ] ) ) { try { $ this -> attributes [ $ key ] = $ this -> encryptedAttribute ( $ this -> attributes [ $ key ] ) ; } catch ( EncryptException $ e ) { } } }
Encrypt a stored attribute.

@param string $key

@return void
Encrypt a stored attribute .