weigh)) { $pk = $model->getPk(); if (strlen($model[$pk]) >= 19) { $model->where($pk, $model[$pk])->update(['weigh' => $model->count()]); } else { $model->where($pk, $model[$pk])->update(['weigh' => $model[$pk]]); } } } public function getTxInAttr($value): ?float { return is_null($value) ? null : (float)$value; } public function getTxOutAttr($value): ?float { return is_null($value) ? null : (float)$value; } public function getFundInAttr($value): ?float { return is_null($value) ? null : (float)$value; } public function getFundOutAttr($value): ?float { return is_null($value) ? null : (float)$value; } public function MoneyLog(): hasMany { return $this->hasMany(UserMoneyLog::class, 'bank_id'); } }