mirror of
https://github.com/archtechx/virtualcolumn.git
synced 2025-12-12 17:04: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
|
||||
{
|
||||
/**
|
||||
* Cast the given value.
|
||||
*
|
||||
* @param array<string, mixed> $attributes
|
||||
*/
|
||||
public function get(Model $model, string $key, mixed $value, array $attributes): mixed
|
||||
public function get($model, $key, $value, $attributes)
|
||||
{
|
||||
return Crypt::decryptString($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare the given value for storage.
|
||||
*
|
||||
* @param array<string, mixed> $attributes
|
||||
*/
|
||||
public function set(Model $model, string $key, mixed $value, array $attributes): mixed
|
||||
public function set($model, $key, $value, $attributes)
|
||||
{
|
||||
return Crypt::encryptString($value);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue