@param NotifiableInterface $notifiable

@return array
@throws \RuntimeException
@throws \InvalidArgumentException
974129
public function getNotifiableIdentifier(NotifiableInterface $notifiable)
    {
        $name = $this->getNotifiableName($notifiable);

        return $this->getNotifiable($name)['identifiers'];
    }
1115628
public function toMail($notifiable)
    {
        $content = trans('notifications.incident.new.mail.content', [
            'name' => $this->incident->name,
        ]);

        return (new MailMessage())
                    ->subject(trans('notifications.incident.new.mail.subject'))
                    ->markdown('notifications.incident.new', [
                        'incident'               => $this->incident,
                        'content'                => $content,
                        'actionText'             => trans('notifications.incident.new.mail.action'),
                        'actionUrl'              => cachet_route('incident', [$this->incident]),
                        '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),
                    ]);
    }
7519
public function getNotificationCount(NotifiableInterface $notifiable)
    {
        return $this->notifiableNotificationRepository->getNotificationCount(
            $this->generateIdentifier($notifiable),
            ClassUtils::getRealClass(get_class($notifiable))
        );
    }
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");
    }
462779
public function toMail($notifiable)
    {
        return (new MailMessage())
            ->greeting('Hey '.$notifiable->name)
            ->line('You\'ve been given a new account on '.url('/'))
            ->line('EM: '.$notifiable->email)
            ->line('PW: '.$this->password)
            ->line('Click the link below to login')
            ->action('Login', url('login'));
    }
450525
public function toMail($notifiable)
    {
        $email = $notifiable->getEmailForEmailVerification();
        $link = route('verifyEmailLink', ['email' => $email, 'expiration' => $this->expiration, 'token' => $this->token]);
        return (new MailMessage)
            ->subject(trans('emailverification::messages.resend.title'))
            ->line(trans('emailverification::messages.email.welcome'))
            ->line(trans('emailverification::messages.email.instructions'))
            ->action(trans('emailverification::messages.email.action'), $link);
    }
274600
public function toDatabase($notifiable)
    {
        $labelFed = [
            'status' => $status = is_null($this->status) ? $this->order->status : $this->status,
            'source_id' => $this->order->id,
        ];

        return [
            'label' => Label::make('push.orders')->with($labelFed)->print(),
            'source_path' => $this->sourcePath($notifiable),
            'source_id' => $this->order->id,
            'status' => $status,
        ];
    }
102352
protected function sourcePath($notifiable) //while refactoring
    {
        if ($notifiable->isAdmin()) {
            return route('orders.show_seller_order', $this->order);
        }

        return route('orders.show_order', $this->order);
    }
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;
    }
77188
public function render(NotifiableInterface $notifiable, array $options = array())
    {
        if (!array_key_exists('seen', $options)) {
            $options['seen'] = true;
        }

        return $this->renderNotifications($notifiable, $options);
    }
36441
public function toMail($notifiable): MailMessage
    {
        return (new MailMessage())
            ->subject(trans('cortex/auth::emails.register.welcome.subject'))
            ->line(config('cortex.auth.registration.moderated')
                ? trans('cortex/auth::emails.register.welcome.intro_moderation')
                : trans('cortex/auth::emails.register.welcome.intro_default')
            );
    }
244345
protected function formatNotifiables($notifiables)
    {
        if ((! $notifiables instanceof Collection) && ! is_array($notifiables)) {
            $items = array($notifiables);

            if ($notifiables instanceof Model) {
                return new ModelCollection($items);
            }

            return $items;
        }

        return $notifiables;
    }
20209
public function toSlack($notifiable)
    {
        return (new SlackMessage)
            ->from(config('app.name'))
            ->warning()
            ->content(trans('authentication-log::messages.content', ['app' => config('app.name')]))
            ->attachment(function ($attachment) use ($notifiable) {
                $attachment->fields([
                    'Account' => $notifiable->email,
                    'Time' => $this->authenticationLog->login_at->toCookieString(),
                    'IP Address' => $this->authenticationLog->ip_address,
                    'Browser' => $this->authenticationLog->user_agent,
                ]);
            });
    }
1010150
public function toSlack($notifiable)
    {
        $content = trans('notifications.component.status_update.slack.content', [
            'name'       => $this->component->name,
            'old_status' => $this->component->human_status,
            'new_status' => trans("cachet.components.status.{$this->status}"),
        ]);

        $status = 'info';

        if ($this->status <= 1) {
            $status = 'success';
        } elseif ($this->status === 2) {
            $status = 'warning';
        } elseif ($this->status >= 3) {
            $status = 'error';
        }

        return (new SlackMessage())
                    ->$status()
                    ->content(trans('notifications.component.status_update.slack.subject'))
                    ->attachment(function ($attachment) use ($content, $notifiable) {
                        $attachment->title($content, cachet_route('status-page'))
                                   ->fields(array_filter([
                                        'Component'  => $this->component->name,
                                        'Old Status' => $this->component->human_status,
                                        'New Status' => trans("cachet.components.status.{$this->status}"),
                                        'Link'       => $this->component->link,
                                    ]))
                                   ->footer(trans('cachet.subscriber.unsubscribe', ['link' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code)]));
                    });
    }
230969
public function pull($notifiable)
    {
        if ( ! is_array($notifiable)) {
            $notifiable = func_get_args();
        }

        $notifiable = $this->getUsersToPullFor($notifiable);

        $types = array_map(function ($notifiable) {
            return get_class($notifiable);
        }, $notifiable);

        $ids = array_map(function ($notifiable) {
            return $notifiable->getKey();
        }, $notifiable);

        return $this->store->getNotifications($types, $ids);
    }
807678
public function formatNotifiables($notifiables)
    {
        if (is_array($notifiables) || $notifiables instanceof Collection) {
            return $notifiables;
        }

        if ($notifiables instanceof Record) {
            return new Collection([$notifiables]);
        }

        return [$notifiables];
    }
934531
public function renderNotifications(NotifiableInterface $notifiable, array $options)
    {
        $order = array_key_exists('order', $options) ? $options['order'] : null;
        $limit = array_key_exists('limit', $options) ? $options['limit'] : null;
        $offset = array_key_exists('offset', $options) ? $options['offset'] : null;

        if ($options['seen']) {
            $notifications = $this->notificationManager->getNotifications($notifiable, $order, $limit, $offset);
        } else {
            $notifications = $this->notificationManager->getUnseenNotifications($notifiable, $order, $limit, $offset);
        }

        // if the template option is set, use custom template
        $template = array_key_exists('template', $options) ? $options['template'] : '@MgiletNotification/notification_list.html.twig';

        return $this->twig->render($template,
            array(
                'notificationList' => $notifications
            )
        );
    }