From 01fdbaaacdce89ab5a00755be618c0409edd1e86 Mon Sep 17 00:00:00 2001 From: Tri Date: Wed, 5 Jun 2024 17:22:14 +0700 Subject: [PATCH] feat: Add bank information to payment reminder message --- app/Console/Commands/PaymentReminderCommand.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Console/Commands/PaymentReminderCommand.php b/app/Console/Commands/PaymentReminderCommand.php index b31cb67..396efa7 100644 --- a/app/Console/Commands/PaymentReminderCommand.php +++ b/app/Console/Commands/PaymentReminderCommand.php @@ -31,6 +31,7 @@ class PaymentReminderCommand extends Command public function handle() { $template = Setting::where('key', 'whatsapp_template')->first()->value; + $bank = Setting::query()->where('key', 'rekening')->first()?->value ?? ''; $customers = Customer::with(['bills', 'plan']) ->where('service_status', ServiceStatus::ACTIVE) @@ -51,6 +52,7 @@ public function handle() 'TARIFPAKET' => $customer->plan->price, 'TAGIHAN' => $customer->plan->price, 'ISOLIR' => $customer->isolir_date, + 'BANK' => $bank, ]; $content = replacePlaceholder($template, $data); $notification = new PaymentReminderNotification($customer->phone_number, $content);