deposit += $amount; $history = self::makeTransferHistory($shopId, $amount); $deposit->save(); $history->save(); return $deposit; } }