whereIn('action', [self::ACTION_TRANSFER_OUT, self::ACTION_TRANSFER_IN]); } /** * 获取变动金额 * * @return string */ public function getChangeBalanceFormatAttribute() { return trim_trailing_zeros(bcdiv($this->attributes['change_balance'], 100, 2)); } }