Documentation

Encryptable

Table of Contents

$encrypter  : Encrypter
$originalEncryptableValues  : array<string|int, mixed>
bootEncryptable()  : void
Boot the encryptable trait for a model.
getEncryptableAttributes()  : array<string|int, mixed>
Returns a collection of fields that will be encrypted.
getEncryptableValue()  : string
Decrypts an attribute value
getEncrypter()  : Encrypter
Provides the encrypter instance.
getOriginalEncryptableValue()  : mixed
Returns the original values of any encrypted attributes.
getOriginalEncryptableValues()  : array<string|int, mixed>
Returns the original values of any encrypted attributes.
makeEncryptableValue()  : string
Encrypts an attribute value and saves it in the original locker.
setEncrypter()  : void
Sets the encrypter instance.

Properties

$originalEncryptableValues

protected array<string|int, mixed> $originalEncryptableValues = []

List of original attribute values before they were encrypted.

Methods

bootEncryptable()

Boot the encryptable trait for a model.

public static bootEncryptable() : void
Return values
void

getEncryptableAttributes()

Returns a collection of fields that will be encrypted.

public getEncryptableAttributes() : array<string|int, mixed>
Return values
array<string|int, mixed>

getEncryptableValue()

Decrypts an attribute value

public getEncryptableValue(string $key) : string
Parameters
$key : string

Attribute

Return values
string

Decrypted value

getOriginalEncryptableValue()

Returns the original values of any encrypted attributes.

public getOriginalEncryptableValue(mixed $attribute) : mixed
Parameters
$attribute : mixed
Return values
mixed

getOriginalEncryptableValues()

Returns the original values of any encrypted attributes.

public getOriginalEncryptableValues() : array<string|int, mixed>
Return values
array<string|int, mixed>

makeEncryptableValue()

Encrypts an attribute value and saves it in the original locker.

public makeEncryptableValue(string $key, string $value) : string
Parameters
$key : string

Attribute

$value : string

Value to encrypt

Return values
string

Encrypted value

setEncrypter()

Sets the encrypter instance.

public setEncrypter(Encrypter $encrypter) : void
Parameters
$encrypter : Encrypter
Return values
void

Search results