Property | Type | Description | |
---|---|---|---|
$hasher | Illuminate\Contracts\Hashing\Hasher | The Hasher to use for hashing. | |
$hashing | boolean | Whether the model is hashing or not. |
Method | Description | |
---|---|---|
addHashable ( string $attribute ) | Add an attribute to the hashable array. | |
bootHashingModelTrait ( ) | Boot the trait's observers. | |
checkHash ( string $value, string $hash ) : boolean | Return whether a plain value matches a hashed value. | |
getHashable ( ) : array | Get the hashable attributes. | |
getHasher ( ) : Illuminate\Contracts\Hashing\Hasher | Set the Hasher to use for hashing. | |
getHashing ( ) : boolean | Returns whether or not the model will hash attributes before saving. | |
hash ( string $value ) : string | Return a hashed string for the value. | |
hashAttributes ( ) | Hash attributes that should be hashed. | |
isHashable ( string $attribute ) : boolean | Returns whether the attribute is hashable. | |
isHashed ( string $attribute ) : boolean | Returns whether the attribute is hashed. | |
mergeHashable ( array $attributes ) | Merge an array of attributes with the hashable array. | |
removeHashable ( string $attribute ) | Remove an attribute from the hashable array. | |
saveWithHashing ( ) : boolean | Save with hashing even if hashing is disabled. | |
saveWithoutHashing ( ) : boolean | Save without hashing even if hashing is enabled. | |
setHashable ( array $attributes ) | Set the hashable attributes. | |
setHasher ( Illuminate\Contracts\Hashing\Hasher $hasher ) | Set the Hasher to use for hashing. | |
setHashing ( $value ) | Set whether or not the model will hash attributes before saving. | |
setHashingAttribute ( string $attribute, string $value ) | Set a hashed value for a hashable attribute. |
Method | Description | |
---|---|---|
setHashingAndSave ( boolean $hash ) : boolean | Set hashing state and then save and then reset it. |
public addHashable ( string $attribute ) | ||
$attribute | string | to hash |
public static bootHashingModelTrait ( ) |
public getHashable ( ) : array | ||
return | array |
public getHasher ( ) : Illuminate\Contracts\Hashing\Hasher | ||
return | Illuminate\Contracts\Hashing\Hasher |
public getHashing ( ) : boolean | ||
return | boolean |
public isHashable ( string $attribute ) : boolean | ||
$attribute | string | name |
return | boolean |
public mergeHashable ( array $attributes ) | ||
$attributes | array | to hash |
public removeHashable ( string $attribute ) | ||
$attribute | string | to hash |
public saveWithHashing ( ) : boolean | ||
return | boolean |
public saveWithoutHashing ( ) : boolean | ||
return | boolean |
public setHashable ( array $attributes ) | ||
$attributes | array | to hash |
public setHasher ( Illuminate\Contracts\Hashing\Hasher $hasher ) | ||
$hasher | Illuminate\Contracts\Hashing\Hasher |
public setHashing ( $value ) |
protected setHashingAndSave ( boolean $hash ) : boolean | ||
$hash | boolean | |
return | boolean |
public setHashingAttribute ( string $attribute, string $value ) | ||
$attribute | string | name |
$value | string | to hash |
protected Hasher,Illuminate\Contracts\Hashing $hasher | ||
return | Illuminate\Contracts\Hashing\Hasher |
protected bool $hashing | ||
return | boolean |