whatsappLog; if($whatsappLog->whatsappGateway->type == StatusEnum::FALSE->status() && $whatsappLog->status != CommunicationStatusEnum::FAIL->value) { SendWhatsapp::sendNodeMessages($whatsappLog, null); } else { SendWhatsapp::sendCloudApiMessages($whatsappLog, null); } } catch (\Exception $exception) { \Log::error("Process whatsapp failed: " . $exception->getMessage()); } } }