deposit += $amount; $history->transfer_reason = DepositTransferReason::チャージ; $deposit->save(); $history->save(); return $deposit; } }