/** * Mark notification as read * * @param NotificationInterface $notification * @return bool */ public function markRead(NotificationInterface $notification) { $notification->setRead(true); $this->save($notification); return true; }
/** * Remove notification * * @param EloquentNotification|NotificationInterface $notification * @return bool */ public function remove(NotificationInterface $notification) { $notification->delete(); return true; }
/** * Save notification * * @param NotificationInterface $notification * @return NotificationInterface */ public function save(NotificationInterface $notification) { $notification->setUpdated(new \DateTime()); $this->objectManager->persist($notification); $this->objectManager->flush(); return $notification; }