Get the Nexmo / SMS representation of the notification.

@param mixed $notifiable

@return \Illuminate\Notifications\Messages\NexmoMessage
765894
public function toNexmo($notifiable)
    {
        $content = trans('notifications.component.status_update.sms.content', [
            'name'       => $this->component->name,
            'old_status' => $this->component->human_status,
            'new_status' => trans("cachet.components.status.{$this->status}"),
        ]);

        return (new NexmoMessage())->content($content);
    }
804508
public function toMail($notifiable)
    {
        $modelInfo = array(
            'id' => $this->larametricsModel->id,
            'model' => $this->larametricsModel->model,
            'method' => $this->larametricsModel->method,
            'original' => json_decode($this->larametricsModel->original, true),
            'changes' => json_decode($this->larametricsModel->changes, true)
        );
        $alertColor = '#ff9f00';
        switch($this->larametricsModel->method) {
            case 'created':
                $alertColor = '#00B945';
            break;
            case 'deleted':
                $alertColor = '#BC001A';
            break;
        }

        return (new MailMessage)
            ->subject(env('LARAMETRICS_MODEL_SUBJECT', '[Larametrics Alert] A model has been ' . $modelInfo['method']))
            ->from(env('LARAMETRICS_FROM_EMAIL', 'alerts@larametrics.com'), env('LARAMETRICS_FROM_NAME', 'Larametrics Alerts'))
            ->view('larametrics::emails.model-changed', [
                'modelInfo' => $modelInfo,
                'alertColor' => $alertColor
            ]);
    }
483407
public function toMail($notifiable)
    {
        return (new MailMessage)->subject('Contact Us')
            ->greeting("Dear {$notifiable->firstname}")
            ->line("The following information was submitted from the <strong>Contact Us</strong>.")
            ->line('&nbsp;')
            ->line("<strong>Contact Us Details</strong>")
            ->line("Fullname: {$this->contactUs->fullname}")
            ->line("Email: {$this->contactUs->email}")
            ->line("Phone: {$this->contactUs->phone}")
            ->line("Enquiry: {$this->contactUs->content}")
            ->action('View Contact Us Report', url('/admin/reports/contact-us'));
    }
784933
public function toMail($notifiable)
    {
        $prefix = ucfirst(config('multiauth.prefix'));

        return (new MailMessage())
            ->subject("New Registration for {$prefix}")
            ->line("You are registered as an {$prefix} with this Email. Now you can login with these credentials.")
            ->line("Your password is - {$this->password}")
            ->line('We suggest you to change this password as soon as possible.')
            ->action("Login as {$prefix}", route('admin.login'))
            ->line("If you don't know about this, just ignore this email");
    }
29769
public function toMail($notifiable)
    {
        $message = (new MailMessage)
            ->view('HCACL::emails.template')
            ->subject(trans('HCACL::users.welcome_email.subject'))
            ->greeting(trans('HCACL::users.welcome_email.greeting'))
            ->line(trans('HCACL::users.welcome_email.text'))
            ->line(trans('HCACL::users.welcome_email.show_email', ['email' => $notifiable->email]));

        if( $this->sendPassword ) {
            $message->line(trans('HCACL::users.welcome_email.show_password', ['password' => $this->sendPassword]));
        }

        $message->action(trans('HCACL::users.welcome_email.login_link'), route($this->authRoute));

        if( is_null($notifiable->activated_at) ) {
            $message->line(trans('HCACL::users.welcome_email.activation_required'));
        }

        return $message;
    }
856235
public function toSlack($notifiable)
    {
        $content = trans('notifications.incident.new.slack.content', [
            'app_name' => Config::get('setting.app_name'),
        ]);

        $status = 'info';

        if ($this->incident->status === Incident::FIXED) {
            $status = 'success';
        } elseif ($this->incident->status === Incident::WATCHED) {
            $status = 'warning';
        } else {
            $status = 'error';
        }

        return (new SlackMessage())
                    ->$status()
                    ->content($content)
                    ->attachment(function ($attachment) use ($notifiable) {
                        $attachment->title(trans('notifications.incident.new.slack.title', ['name' => $this->incident->name]))
                                   ->timestamp($this->incident->getWrappedObject()->occurred_at)
                                   ->fields(array_filter([
                                        'ID'   => "#{$this->incident->id}",
                                        'Link' => $this->incident->permalink,
                                    ]))
                                   ->footer(trans('cachet.subscriber.unsubscribe', ['link' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code)]));
                    });
    }
146254
public function getNotifiableName(NotifiableInterface $notifiable)
    {
        // fixes the case when the notifiable is a proxy
        $class = ClassUtils::getRealClass(get_class($notifiable));
        $annotation = $this->annotationReader->getClassAnnotation(new \ReflectionClass($class), 'Mgilet\NotificationBundle\Annotation\Notifiable');
        if ($annotation) {
            return $annotation->getName();
        }

        return null;
    }
703259
public function toMail($notifiable)
    {
        $mail = (new MailMessage())
            ->subject($this->subject)
            ->markdown($this->template, [
                'subject'    => $this->subject,
                'content'    => $this->content,
                'link'       => $this->link,
                'link_label' => $this->link_label,
                'data'       => $this->data,
            ]);

        if ($this->cc) {
            $mail->cc($this->cc);
        }

        if ($this->bcc) {
            $mail->bcc($this->bcc);
        }

        if ($this->attachments) {
            if (is_array($this->attachments)) {
                foreach ($this->attachments as $attachment) {
                    $mail->attach($attachment);
                }
            } else {
                $mail->attach($this->attachments);
            }
        }

        return $mail;
    }
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');
    }
978582
public function toMail($notifiable)
    {
        return (new MailMessage)
            ->greeting('Hey '.$notifiable->name)
            ->line('You have a brand new account on '.url('/'))
            ->line('But, you are receiving this email because we need you to activate your account.')
            ->action('Activate Account', url('activate/token', $this->token));
    }
1048069
public function listAction($notifiable)
    {
        $notifiableRepo = $this->get('doctrine.orm.entity_manager')->getRepository('MgiletNotificationBundle:NotifiableNotification');
        $notificationList = $notifiableRepo->findAllForNotifiableId($notifiable);
        return $this->render('@MgiletNotification/notifications.html.twig', array(
            'notificationList' => $notificationList,
            'notifiableNotifications' => $notificationList // deprecated: alias for backward compatibility only
        ));
    }
7987
protected function getRecipients($notifiable, $notification, $message)
    {
        if (is_string($recipients = $notifiable->routeNotificationFor('mail', $notification))) {
            $recipients = [$recipients];
        }

        return collect($recipients)->mapWithKeys(function ($recipient, $email) {
            return is_numeric($email)
                    ? [$email => (is_string($recipient) ? $recipient : $recipient->email)]
                    : [$email => $recipient];
        })->all();
    }
125684
public function send($notifiable, Notification $notification)
    {
        try {
            $to = $this->getTo($notifiable);
            $message = $notification->toTwilio($notifiable);
            $useSender = $this->canReceiveAlphanumericSender($notifiable);

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

            if (! $message instanceof TwilioMessage) {
                throw CouldNotSendNotification::invalidMessageObject($message);
            }

            return $this->twilio->sendMessage($message, $to, $useSender);
        } catch (Exception $exception) {
            $event = new NotificationFailed($notifiable, $notification, 'twilio', ['message' => $exception->getMessage(), 'exception' => $exception]);
            if (function_exists('event')) { // Use event helper when possible to add Lumen support
                event($event);
            } else {
                $this->events->fire($event);
            }
        }
    }
1112494
public function toMail($notifiable)
    {
        if (static::$toMailCallback) {
            return call_user_func(static::$toMailCallback, $notifiable, $this->token);
        }

        return (new MailMessage)
            ->subject(Lang::getFromJson('Reset Password Notification'))
            ->line(Lang::getFromJson('You are receiving this email because we received a password reset request for your account.'))
            ->action(Lang::getFromJson('Reset Password'), url(config('app.url').route('password.reset', ['token' => $this->token], false)))
            ->line(Lang::getFromJson('This password reset link will expire in :count minutes.', ['count' => config('auth.passwords.users.expire')]))
            ->line(Lang::getFromJson('If you did not request a password reset, no further action is required.'));
    }
830744
public function toSlack($notifiable)
    {
        $content = trans('notifications.incident.update.slack.content', [
            'name'       => $this->update->incident->name,
            'new_status' => $this->update->human_status,
        ]);

        $status = 'info';

        if ($this->update->status === Incident::FIXED) {
            $status = 'success';
        } elseif ($this->update->status === Incident::WATCHED) {
            $status = 'warning';
        } else {
            $status = 'error';
        }

        return (new SlackMessage())
                    ->$status()
                    ->content($content)
                    ->attachment(function ($attachment) use ($content, $notifiable) {
                        $attachment->title(trans('notifications.incident.update.slack.title', [
                                        'name'       => $this->update->incident->name,
                                        'new_status' => $this->update->human_status,
                                    ]))
                                   ->timestamp($this->update->getWrappedObject()->created_at)
                                   ->fields(array_filter([
                                        'ID'   => "#{$this->update->id}",
                                        'Link' => $this->update->permalink,
                                    ]))
                                   ->footer(trans('cachet.subscriber.unsubscribe', ['link' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code)]));
                    });
    }
317704
public function send($notifiable, Notification $notification)
    {
        $message = $notification->toMail($notifiable);

        if (! $notifiable->routeNotificationFor('mail', $notification) &&
            ! $message instanceof Mailable) {
            return;
        }

        if ($message instanceof Mailable) {
            return $message->send($this->mailer);
        }

        $this->mailer->send(
            $this->buildView($message),
            array_merge($message->data(), $this->additionalMessageData($notification)),
            $this->messageBuilder($notifiable, $notification, $message)
        );
    }
955816
public function toMail($notifiable)
    {
        $content = trans('notifications.component.status_update.mail.content', [
            'name'       => $this->component->name,
            'old_status' => $this->component->human_status,
            'new_status' => trans("cachet.components.status.{$this->status}"),
        ]);

        return (new MailMessage())
            ->subject(trans('notifications.component.status_update.mail.subject'))
            ->markdown('notifications.component.update', [
                'componentName'          => $this->component->name,
                'content'                => $content,
                'unsubscribeText'        => trans('cachet.subscriber.unsubscribe'),
                'unsubscribeUrl'         => cachet_route('subscribe.unsubscribe', $notifiable->verify_code),
                'manageSubscriptionText' => trans('cachet.subscriber.manage_subscription'),
                'manageSubscriptionUrl'  => cachet_route('subscribe.manage', $notifiable->verify_code),
        ]);
    }