From 19cc47942b36ff6d09308897e21788c191fee03f Mon Sep 17 00:00:00 2001 From: Nurmuhammet Allanov Date: Fri, 19 Dec 2025 18:00:49 +0500 Subject: [PATCH] wip --- .../Order/SendOrderCreatedNotification.php | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/app/Listeners/Ecommerce/Order/SendOrderCreatedNotification.php b/app/Listeners/Ecommerce/Order/SendOrderCreatedNotification.php index 84e4218..a9f7d48 100644 --- a/app/Listeners/Ecommerce/Order/SendOrderCreatedNotification.php +++ b/app/Listeners/Ecommerce/Order/SendOrderCreatedNotification.php @@ -75,17 +75,17 @@ class SendOrderCreatedNotification implements ShouldQueue */ public function sendSMSToStaff($order): void { - // $exists = DB::table('order_sent_notifications') - // ->where('order_id', $order->id) - // ->where('phone_number', orderAdminNumber()) - // ->exists(); + $exists = DB::table('order_sent_notifications') + ->where('order_id', $order->id) + ->where('phone_number', orderAdminNumber()) + ->exists(); - // if (! $exists) { - // DB::table('order_sent_notifications') - // ->insert([ - // 'order_id' => $order->id, - // 'phone_number' => orderAdminNumber(), - // ]); + if (! $exists) { + DB::table('order_sent_notifications') + ->insert([ + 'order_id' => $order->id, + 'phone_number' => orderAdminNumber(), + ]); sendSMS( phone: orderAdminNumber(), @@ -96,17 +96,17 @@ class SendOrderCreatedNotification implements ShouldQueue ) ); - // Log::channel('order_sms_notification_sent_activity') - // ->info(sprintf('SMS_SENT_FOR_ORDER[id, phone]: %s, %s', $order->id, orderAdminNumber())); + Log::channel('order_sms_notification_sent_activity') + ->info(sprintf('SMS_SENT_FOR_ORDER[id, phone]: %s, %s', $order->id, orderAdminNumber())); - // User::where('phone_number', orderAdminNumber())->first()->notify( - // NovaNotification::make() - // ->message('Täze sargyt.') - // ->action('Gör', sprintf('/turkmenpostadmin/resources/orders/%s', $order->id)) - // ->icon('download') - // ->type('info') - // ); - // } + User::where('phone_number', orderAdminNumber())->first()->notify( + NovaNotification::make() + ->message('Täze sargyt.') + ->action('Gör', sprintf('/turkmenpostadmin/resources/orders/%s', $order->id)) + ->icon('download') + ->type('info') + ); + } } /**