Purgeable
trait Purgeable
Purgeable model trait
Usage: * In the model class definition:
use \Igniter\Flame\Database\Traits\Purgeable;
You must set attribute names which should not be saved to the database:
protected $purgeable = ['password'];
Properties
protected array | $originalPurgeableValues |
Methods
Boot the purgeable trait for a model.
Adds an attribute to the purgeable attributes list
Removes purged attributes, used before saving.
Returns a collection of fields to be hashed.
Returns the original values.
Returns the original value of a single attribute.
Restores the original values.
Details
at line 32
static void
bootPurgeable()
Boot the purgeable trait for a model.
at line 56
$this
addPurgeable(array|string|null $attributes = null)
Adds an attribute to the purgeable attributes list
at line 72
array
purgeAttributes(null $attributesToPurge = null)
Removes purged attributes, used before saving.
at line 98
getPurgeableAttributes()
Returns a collection of fields to be hashed.
at line 106
getOriginalPurgeValues()
Returns the original values.
at line 118
null
getOriginalPurgeValue($attribute)
Returns the original value of a single attribute.
at line 128
restorePurgedValues()
Restores the original values.