Property | Type | Description | |
---|---|---|---|
$purging | boolean | Whether the model is purging or not. |
Method | Description | |
---|---|---|
addPurgeable ( string $attribute ) | Add an attribute to the purgeable array. | |
bootPurgingModelTrait ( ) | Boot the trait's observers. | |
getPurgeable ( ) : array | Get the purgeable attributes. | |
getPurging ( ) : boolean | Returns whether or not the model will purge attributes before saving. | |
isPurgeable ( string $attribute ) : boolean | Returns whether the attribute is purgeable. | |
mergePurgeable ( array $attributes ) | Merge an array of attributes with the purgeable array. | |
purgeAttributes ( ) | Unset attributes that should be purged. | |
removePurgeable ( string $attribute ) | Remove an attribute from the purgeable array. | |
saveWithPurging ( ) : boolean | Save with purging even if purging is disabled. | |
saveWithoutPurging ( ) : boolean | Save without purging even if purging is enabled. | |
setPurgeable ( array $attributes ) | Set the purgeable attributes. | |
setPurging ( $value ) | Set whether or not the model will purge attributes before saving. |
Method | Description | |
---|---|---|
setPurgingAndSave ( boolean $purge ) : boolean | Set purging state and then save and then reset it. |
public addPurgeable ( string $attribute ) | ||
$attribute | string | to purge |
public static bootPurgingModelTrait ( ) |
public getPurgeable ( ) : array | ||
return | array |
public getPurging ( ) : boolean | ||
return | boolean |
public isPurgeable ( string $attribute ) : boolean | ||
$attribute | string | name |
return | boolean |
public mergePurgeable ( array $attributes ) | ||
$attributes | array | to purge |
public removePurgeable ( string $attribute ) | ||
$attribute | string | to purge |
public saveWithPurging ( ) : boolean | ||
return | boolean |
public saveWithoutPurging ( ) : boolean | ||
return | boolean |
public setPurgeable ( array $attributes ) | ||
$attributes | array | to purge |
public setPurging ( $value ) |
protected setPurgingAndSave ( boolean $purge ) : boolean | ||
$purge | boolean | |
return | boolean |
protected bool $purging | ||
return | boolean |