Flarum\Core\Notification\NotificationSyncer::restore PHP Méthode

restore() public méthode

Restore a notification for all users.
public restore ( Flarum\Core\Notification\BlueprintInterface $blueprint ) : void
$blueprint Flarum\Core\Notification\BlueprintInterface
Résultat void
    public function restore(BlueprintInterface $blueprint)
    {
        Notification::where($this->getAttributes($blueprint))->update(['is_deleted' => false]);
    }

Usage Example

 /**
  * @param PostWasRestored $event
  */
 public function whenPostWasRestored(PostWasRestored $event)
 {
     $this->notifications->restore($this->getNotification($event->post));
 }