Esensi\Model\Traits\EncryptingModelTrait::isEncrypted PHP Метод

isEncrypted() публичный Метод

Returns whether the attribute is encrypted.
public isEncrypted ( string $attribute ) : boolean
$attribute string name
Результат boolean
    public function isEncrypted($attribute)
    {
        if (!array_key_exists($attribute, $this->attributes)) {
            return false;
        }
        try {
            $this->decrypt(array_get($this->attributes, $attribute));
        } catch (DecryptException $exception) {
            return false;
        }
        return true;
    }