October\Rain\Database\Traits\Purgeable


Protected Properties

protected array $originalPurgeableValues

originalPurgeableValues before they were purged.


Public Methods

public addPurgeable()

public addPurgeable(array|string|null $attributes = null): void 

addPurgeable adds an attribute to the purgeable attributes list

public getOriginalPurgeValue()

public getOriginalPurgeValue($attribute): void

getOriginalPurgeValue returns the original values of any purged attributes.

public getOriginalPurgeValues()

public getOriginalPurgeValues(): void

getOriginalPurgeValues returns the original values of any purged attributes.

public getPurgeableAttributes()

public getPurgeableAttributes(): void

getPurgeableAttributes returns a collection of fields that will be hashed.

public initializePurgeable()

public initializePurgeable(): void

initializePurgeable trait for a model.

public purgeAttributes()

public purgeAttributes(mixed $attributes = null): array 

purgeAttributes removes purged attributes from the dataset, used before saving. Specify attributesToPurge, if unspecified, $purgeable property is used

public restorePurgedValues()

public restorePurgedValues(): void

restorePurgedValues restores the original values of any purged attributes.