Skip to content

Commit

Permalink
✨ (Model): EncryptDataIndex 支持 php 7
Browse files Browse the repository at this point in the history
  • Loading branch information
Joycezhangw committed Mar 4, 2024
1 parent e98a255 commit 487b8ba
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/Model/Casts/EncryptDataIndex.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,15 @@
*/
class EncryptDataIndex implements CastsInboundAttributes
{
public function __construct(protected string $indexType = '')
{
/**
* 加密类型,分别为:nick,phone,idCard
* @var mixed|string
*/
protected $indexType;

public function __construct($indexType = '')
{
$this->indexType = $indexType;
}

/**
Expand All @@ -24,7 +30,7 @@ public function __construct(protected string $indexType = '')
* @param array $attributes
* @return string
*/
public function set(Model $model, string $key, mixed $value, array $attributes): string
public function set($model, string $key, $value, array $attributes): string
{
if (trim($value) == '') {
return "";
Expand Down

0 comments on commit 487b8ba

Please sign in to comment.