Purgeable

 trait Winter\Storm\Database\Traits\Purgeable

Properties

protected $originalPurgeableValues : array

List of original attribute values before they were purged.

Methods

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

Adds an attribute to the purgeable attributes list

Parameters
Property Description
$attributes
array | string | null
Returns
$this

public static bootPurgeable () : void

Boot the purgeable trait for a model.

Returns
void

public getOriginalPurgeValue ($attribute)

Returns the original values of any purged attributes.

Parameters
Property Description
$attribute
mixed
Returns
mixed

public getOriginalPurgeValues ()

Returns the original values of any purged attributes.

Returns
mixed

public getPurgeableAttributes ()

Returns a collection of fields that will be hashed.

Returns
mixed

public purgeAttributes (array | string $attributesToPurge = null) : array

Removes purged attributes from the dataset, used before saving.

Parameters
Property Description
$attributesToPurge
array | string

Attribute(s) to purge, if unspecified, $purgable property is used

Returns
array

Current attribute set

public restorePurgedValues ()

Restores the original values of any purged attributes.

Returns
mixed

Used by

Class Description
File

File attachment model

Parameter

Parameters model Used for storing internal application parameters.

Revision

Revision history model

User

Administrator user model

UserGroup

Administrator group

UserPreference

All preferences for the backend user

UserRole

Administrator role

UserThrottle

Administrator throttling model

Group

Group model

Preferences

User Preferences model

Role

Role model

Throttle

Throttle model

User

User model

File

File attachment model

Model

Active Record base class.

DeferredBinding

Deferred Binding Model

Revision

Revision Model

MorphPivot

Reimplementation of \Illuminate\Database\Eloquent\Relations\MorphPivot but extends Winter's Pivot base class instead of Laravel's to get access to Winter magic.

Pivot
Copyright © 2024 Winter CMS