We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
//OrderObserver if ($order->status === Order::STATUS_PAYMENT_VERIFY || $order->status === Order::STATUS_RECEIVED) { $statusVerification = $order->status === Order::STATUS_PAYMENT_VERIFY ? 'Butuh Verifikasi' : Order::STATUS_PAYMENT_VERIFY; $statusReceived = $order->status === Order::STATUS_RECEIVED ? 'Butuh Penerusan Dana' : Order::STATUS_RECEIVED; if($statusVerification) { $message = "Pesanan #{$order->order_number} status: {$statusVerification} di Toko #{$order->merchant->name}"; } elseif($statusReceived) { $message = "Pesanan #{$order->order_number} status: {$statusReceived} di Toko #{$order->merchant->name}"; } Log::info('Sending notification', ['message' => $message]); // Kirim notifikasi Notification::route('telegram', env('TELEGRAM_CHAT_ID')) ->notify(new TelegramNotification($message)); } $merchants = Merchant::all(); // Ambil semua merchant // Cek status merchant if($merchants->contains('status', Merchant::STATUS_VERIFY)) { foreach ($merchants as $merchant) { $message = "Toko #{$merchant->name} butuh verifikasi"; Log::info('Sending notification', ['message' => $message]); // Kirim notifikasi Notification::route('telegram', env('TELEGRAM_CHAT_ID')) ->notify(new TelegramNotification($message)); } } //TelegramNotification public function via($notifiable) { return [TelegramChannel::class]; } public function toTelegram($notifiable) { $chat_id = env('TELEGRAM_CHAT_ID'); // Chat ID dari grup atau channel Telegram::sendMessage([ 'chat_id' => $chat_id, 'text' => $this->message ]); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: