October\Rain\Database\Traits\Encryptable

Source: ~/vendor/october/rain/src/Database/Traits/Encryptable.php

Protected properties

protected array $originalEncryptableValues

List of original attribute values before they were encrypted.

Public methods

public static void bootEncryptable()

Boot the encryptable trait for a model.

public array getEncryptableAttributes()

Returns a collection of fields that will be encrypted.

public string getEncryptableValue(string $key)

Decrypts an attribute value

Parameters
  • string $key - Attribute

public mixed getOriginalEncryptableValue($attribute)

Returns the original values of any encrypted attributes.

Parameters
  • $attribute

public array getOriginalEncryptableValues()

Returns the original values of any encrypted attributes.

public string makeEncryptableValue(string $key, string $value)

Encrypts an attribute value and saves it in the original locker.

Parameters
  • string $key - Attribute
  • string $value - Value to encrypt