writeAccountLog([ // 'obj_type' => $objType, // 'obj_id' => $objId, // 'obj_name' => $objName, // 'vm_type' => $vmType, // 'amount' => $amount, // 'balance' => $balance, // 'direction' => $direction, // 'op' => $op, // 'channel' => $channel, // 'note' => $note, // ]); // } private function logAccount($fromType, $fromId, $fromName, $fromAmount, $op, $toType, $toId, $toName, $toAmount) { return AccountLog::create([ 'from_type' => $fromType, 'from_id' => $fromId, 'from_name' => $fromName, 'from_amount' => $fromAmount, 'op' => $op, 'to_type' => $toType, 'to_id' => $toId, 'to_name' => $toName, 'to_amount' => $toAmount, ]); } }