|
|
@ -31,18 +31,6 @@ class Agent extends BaseModel |
|
|
$this->attributes['license_pic'] = str_replace(env('APP_URL'), '', $value); |
|
|
$this->attributes['license_pic'] = str_replace(env('APP_URL'), '', $value); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function setPasswordAttribute($value) |
|
|
|
|
|
{ |
|
|
|
|
|
if ($value) { |
|
|
|
|
|
if ( |
|
|
|
|
|
empty($this->attributes['password']) || //新增时
|
|
|
|
|
|
$this->attributes['password'] != $value && !empty($this->attributes['password']) //编辑时
|
|
|
|
|
|
) { |
|
|
|
|
|
$this->attributes['password'] = $this->passMd5($value); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function agentInfo() |
|
|
public function agentInfo() |
|
|
{ |
|
|
{ |
|
|
return $this->hasOne(AgentInfo::class); |
|
|
return $this->hasOne(AgentInfo::class); |
|
|
|