'json']; //密码修改 public function setPasswordAttribute($value) { if (!empty($value)) { $this->attributes['password'] = password_hash($value, PASSWORD_BCRYPT); } } public function demand() { return $this->morphOne('App\Models\Demand', 'publisher'); } public function demandUser() { return $this->morphOne('App\Models\Demand', 'biddingUser'); } public function demandBidding() { return $this->morphOne('App\Models\DemandBidding', 'biddingUser'); } public function agentProductItem() { return $this->hasMany(AgentProductItem::class); } public function workoorder() { return $this->morphOne('App\Models\Workorder', 'publisher'); } public function point() { return $this->morphOne('App\Models\Workorder', 'point'); } public function workoorderitem() { return $this->morphOne('App\Models\WorkorderItem', 'publisher'); } public function statement() { return $this->morphMany('App\Models\Statement', 'user'); } public function withdrawal() { return $this->morphOne('App\Models\Withdrawal', 'user'); } }