October\Rain\Database\Traits\Purgeable

Protected properties

protected array $originalPurgeableValues

List of original attribute values before they were purged.

Public methods

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

Adds an attribute to the purgeable attributes list

Parameters
  • array|string|null $attributes

public static void bootPurgeable()

Boot the purgeable trait for a model.

public void getOriginalPurgeValue($attribute)

Returns the original values of any purged attributes.

Parameters
  • $attribute

public void getOriginalPurgeValues()

Returns the original values of any purged attributes.

public void getPurgeableAttributes()

Returns a collection of fields that will be hashed.

public array purgeAttributes($attributes $attributesToPurge=NULL)

Removes purged attributes from the dataset, used before saving.

Parameters
  • $attributes $attributesToPurge - Mixed Attribute(s) to purge, if unspecified, $purgable property is used

public void restorePurgedValues()

Restores the original values of any purged attributes.