mirror of
https://github.com/archtechx/virtualcolumn.git
synced 2025-12-12 10:54:04 +00:00
Delete get() and set() types
This commit is contained in:
parent
cd2cd5948a
commit
4414d11203
1 changed files with 2 additions and 12 deletions
|
|
@ -189,22 +189,12 @@ class FooModel extends Model
|
||||||
|
|
||||||
class EncryptedCast implements CastsAttributes
|
class EncryptedCast implements CastsAttributes
|
||||||
{
|
{
|
||||||
/**
|
public function get($model, $key, $value, $attributes)
|
||||||
* Cast the given value.
|
|
||||||
*
|
|
||||||
* @param array<string, mixed> $attributes
|
|
||||||
*/
|
|
||||||
public function get(Model $model, string $key, mixed $value, array $attributes): mixed
|
|
||||||
{
|
{
|
||||||
return Crypt::decryptString($value);
|
return Crypt::decryptString($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public function set($model, $key, $value, $attributes)
|
||||||
* Prepare the given value for storage.
|
|
||||||
*
|
|
||||||
* @param array<string, mixed> $attributes
|
|
||||||
*/
|
|
||||||
public function set(Model $model, string $key, mixed $value, array $attributes): mixed
|
|
||||||
{
|
{
|
||||||
return Crypt::encryptString($value);
|
return Crypt::encryptString($value);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue