Queue the given notification instances.

@param  mixed  $notifiables
@param  array[\Illuminate\Notifcations\Channels\Notification]  $notification
@return void
351141
protected function queueNotification($notifiables, $notification)
    {
        if (version_compare($this->app->version(), '5.2', '<')) {
            $this->app->make(Bus::class)->dispatch(
                (new SendQueuedNotifications($notifiables, $notification))
                    ->onQueue($notification->queue)
                    ->delay($notification->delay)
            );
        } else {
            $this->app->make(Bus::class)->dispatch(
                (new SendQueuedNotifications($notifiables, $notification))
                    ->onConnection($notification->connection)
                    ->onQueue($notification->queue)
                    ->delay($notification->delay)
            );
        }
    }
1254797
public function send($notifiable, Notification $notification)
    {
        $message = $notification->toTelegram($notifiable);

        if (is_string($message)) {
            $message = TelegramMessage::create($message);
        }

        if ($message->toNotGiven()) {
            if (!$to = $notifiable->routeNotificationFor('telegram')) {
                throw CouldNotSendNotification::chatIdNotProvided();
            }

            $message->to($to);
        }

        if(isset($message->payload['text']) && $message->payload['text'])
        {
            $params = $message->toArray();
            $this->telegram->sendMessage($params);
        }
        elseif (isset($message->payload['latitude']) && isset($message->payload['longitude'])) {
            $params = $message->toArray();
            $this->telegram->sendLocation($params);
        }
        else
        {
            if(isset($message->payload['file']))
            {
                $params = $message->toMultipart();
                $this->telegram->sendFile($params, $message->type, true);
            }
            else
            {
                $params = $message->toArray();
                $this->telegram->sendFile($params, $message->type);
            }
        }
    }
374580
public function send($notifiable, Notification $notification)
    {
        $message = $notification->toMessagebird($notifiable);

        if (is_string($message)) {
            $message = MessagebirdMessage::create($message);
        }

        if ($to = $notifiable->routeNotificationFor('messagebird')) {
            $message->setRecipients($to);
        }

        $this->client->send($message);
    }
382932
public function send($notifiable, Notification $notification)
    {
        $message = $notification->toSlack();

        $this->http->post($notifiable, $this->buildJsonPayload($message));
    }
69611
public function send($notifiables, $notification)
    {
        if (! $notifiables instanceof Collection && ! is_array($notifiables)) {
            $notifiables = [$notifiables];
        }

        if ($notification instanceof ShouldQueue) {
            return $this->queueNotification($notifiables, $notification);
        }

        return $this->sendNow($notifiables, $notification);
    }
213483
protected function sendToNotifiable($notifiable, $id, $notification, $channel)
    {
        if (!$notification->id) {
            $notification->id = $id;
        }
//        if (! $this->shouldSendNotification($notifiable, $notification, $channel)) {
//            return;
//        }
        $response = $this->manager->channel($channel)->send($notifiable, $notification);

//        $this->events->dispatch(
//            new Events\NotificationSent($notifiable, $notification, $channel, $response)
//        );
        return $response;
    }
909945
public function isSeen(NotifiableInterface $notifiable, NotificationInterface $notification)
    {
        $nn = $this->getNotifiableNotification($notifiable, $notification);
        if ($nn) {
            return $nn->isSeen();
        }

        throw new EntityNotFoundException('The link between the notifiable and the notification has not been found');
    }
1041084
public function send($notifiables, $notification)
    {
        $notifiables = $this->formatNotifiables($notifiables);

        if (! $notification instanceof ShouldQueueInterface) {
            return $this->sendNow($notifiables, $notification);
        }

        foreach ($notifiables as $notifiable) {
            $notificationId = Uuid::uuid4()->toString();

            foreach ($notification->via($notifiable) as $channel) {
                $this->queueToNotifiable($notifiable, $notificationId, clone $notification, $channel);
            }
        }
    }
471259
public function send(Notification $notification)
    {
        $original = clone $notification;

        foreach ($notification->via() as $channel => $notifiables) {
            $notifiables = $this->formatNotifiables($notifiables);

            foreach ($notifiables as $notifiable) {
                $notificationId = Uuid::uuid4()->toString();
                $notification = clone $original;

                if (! $notification->id) {
                    $notification->id = $notificationId;
                }

                if (! $this->shouldSendNotification($notifiable, $notification, $channel)) {
                    continue;
                }

                $response = $this->channel($channel)->send($notifiable, $notification);

                $event = new SendEvent([
                    'notification' => $notification,
                    'notifiable' => $notifiable,
                    'channel' => $channel,
                    'response' => $response,
                ]);

                $this->trigger(self::EVENT_AFTER_SEND, $event);
            }
        }
    }
1211359
public function send($notifiable, Notification $notification)
    {
        if ($facebookSettings = $notifiable->routeNotificationFor('facebookPoster')) {
            $this->switchSettings($facebookSettings);
        }

        $facebookMessage = $notification->toFacebookPoster($notifiable);

        $postBody = $facebookMessage->getPostBody();

        $endpoint = $facebookMessage->getApiEndpoint();

        $this->guardAgainstInvalidPostContent($postBody);

        // here we check if post body has image or video to upload it first to facebook
        if (isset($postBody['media'])) {
            $endpoint = $postBody['media']->getApiEndpoint();

            if ($postBody['media'] instanceof Video) {
                $postBody = array_merge($postBody, $postBody['media']->getData());
            }

            $method = $postBody['media']->getMethod();

            $postBody['source'] = $this->facebook->{$method}($postBody['media']->getPath());

            unset($postBody['media']);
        }

        $this->facebook->post($endpoint, $postBody);
    }
981546
public function send($notifiable, Notification $notification)
    {
        if (! $url = $notifiable->routeNotificationFor('slack')) {
            return;
        }

        $message = $notification->toSlack($notifiable);

        $this->http->post($url, [
            'json' => [
                'text' => $message->content,
                'attachments' => $this->attachments($message),
            ],
        ]);
    }
615272
public function setRPCNotification($notification)
    {
        empty($notification) ? $this->notification = false : $this->notification = true;
    }
1123923
public function send($notifiable, Notification $notification)
    {
        if (! $to = $notifiable->routeNotificationFor('plivo')) {
            return;
        }

        $message = $notification->toPlivo($notifiable);

        if (is_string($message)) {
            $message = new PlivoMessage($message);
        }

        $response = $this->plivo->send_message([
            'src' => $message->from ?: $this->from,
            'dst' => $to,
            'text' => trim($message->content),
        ]);

        if ($response['status'] !== 202) {
            throw CouldNotSendNotification::serviceRespondedWithAnError($response);
        }

        return $response;
    }
1243163
public function sendNotification($notification, $context, $data)
    {
        $users = $notification->getRecipients($context);
        foreach ($users as $user) {
            $this->sendToUser($notification, $context, $user, $data);
        }
    }
821563
public function send($notifiables, $notification)
    {
        $notifiables = $this->formatNotifiables($notifiables);

        if ($notification instanceof ShouldQueue) {
            return $this->queueNotification($notifiables, $notification);
        }

        return $this->sendNow($notifiables, $notification);
    }
769903
protected function shouldSendNotification($notifiable, $notification, $channel)
    {
        $result = $this->events->until(
            new NotificationSending($notifiable, $notification, $channel)
        );

        return ($result !== false);
    }
21191
public function send($notifiable, Notification $notification)
    {
        $email = $notification->toMailDb($notifiable);
        $email->save();
        if ($email->id > 0) {
            return 1;
        }
        return 0;
    }