Protected properties

protected array $originalHashableValues

List of original attribute values before they were hashed.

Public methods

public $this addHashable(array|string|null $attributes=NULL)

Adds an attribute to the hashable attributes list

  • array|string|null $attributes

public static void bootHashable()

Boot the hashable trait for a model.

public bool checkHashValue(string $key, string $value)

Checks if the supplied plain value matches the stored hash value.

  • string $key - Attribute to check
  • string $value - Value to check

public array getHashableAttributes()

Returns a collection of fields that will be hashed.

public mixed getOriginalHashValue($attribute)

Returns the original values of any hashed attributes.

  • $attribute

public array getOriginalHashValues()

Returns the original values of any hashed attributes.

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

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

  • string $key - Attribute
  • string $value - Value to hash