From 6ce74bd59f8412b1c3fa176e6c3e2ba8d403c574 Mon Sep 17 00:00:00 2001 From: harshjagad20 Date: Mon, 13 Dec 2021 11:34:47 +0530 Subject: [PATCH] added migration to calculate base amount for payments table --- ...alculate_base_amount_of_payments_table.php | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 database/migrations/2021_12_13_055813_calculate_base_amount_of_payments_table.php diff --git a/database/migrations/2021_12_13_055813_calculate_base_amount_of_payments_table.php b/database/migrations/2021_12_13_055813_calculate_base_amount_of_payments_table.php new file mode 100644 index 00000000..24cb8da8 --- /dev/null +++ b/database/migrations/2021_12_13_055813_calculate_base_amount_of_payments_table.php @@ -0,0 +1,34 @@ +base_amount = $payment->exchange_rate * $payment->amount; + $payment->save(); + } + } + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } +}