plugin/notification/Manager/NotificationManager.php
public function createNotificationAndNotify(NotifiableInterface $notifiable)
    {
        $userIds = $this->getUsersToNotifyForNotifiable($notifiable);

        $notification = null;
        if (count($userIds) > 0) {
            $resourceId = null;
            if (null !== $notifiable->getResource()) {
                $resourceId = $notifiable->getResource()->getId();
            }

            $notification = $this->createNotification(
                $notifiable->getActionKey(),
                $notifiable->getIconKey(),
                $resourceId,
                $notifiable->getNotificationDetails(),
                $notifiable->getDoer()
            );
            $this->notifyUsers($notification, $userIds);
        }

        return $notification;
    }
public function createNotificationAndNotify(NotifiableInterface $notifiable)
    {
        $userIds = $this->getUsersToNotifyForNotifiable($notifiable);

        $notification = null;
        if (count($userIds) > 0) {
            $resourceId = null;
            if (null !== $notifiable->getResource()) {
                $resourceId = $notifiable->getResource()->getId();
            }

            $notification = $this->createNotification(
                $notifiable->getActionKey(),
                $notifiable->getIconKey(),
                $resourceId,
                $notifiable->getNotificationDetails(),
                $notifiable->getDoer()
            );
            $this->notifyUsers($notification, $userIds);
        }

        return $notification;
    }
public function createNotificationAndNotify ( NotifiableInterface $ notifiable ) { $ userIds = $ this -> getUsersToNotifyForNotifiable ( $ notifiable ) ; $ notification = null ; if ( count ( $ userIds ) > 0 ) { $ resourceId = null ; if ( null !== $ notifiable -> getResource ( ) ) { $ resourceId = $ notifiable -> getResource ( ) -> getId ( ) ; } $ notification = $ this -> createNotification ( $ notifiable -> getActionKey ( ) , $ notifiable -> getIconKey ( ) , $ resourceId , $ notifiable -> getNotificationDetails ( ) , $ notifiable -> getDoer ( ) ) ; $ this -> notifyUsers ( $ notification , $ userIds ) ; } return $ notification ; }
Creates a notification and notifies the concerned users.

@param NotifiableInterface $notifiable

@return Notification
Creates a notification and notifies the concerned users .