amount_paid_history == null){ $amount_paid_history = serialize(array($payment->amount_paid)); \Streamline\Models\DebtorPayment::where('id', $payment->id)->update(['amount_paid_history'=>$amount_paid_history]); } if($payment->receipt_history == null){ $receipt_history = serialize(array($payment->receipt_no)); \Streamline\Models\DebtorPayment::where('id', $payment->id)->update(['receipt_history'=>$receipt_history]); } if($payment->balance_history == null){ $balance_history = serialize(array(0)); \Streamline\Models\DebtorPayment::where('id', $payment->id)->update(['balance_history'=>$balance_history]); } } } }