Flarum\Core\Notification\NotificationSyncer::restore PHP Метод

restore() публичный Метод

Restore a notification for all users.
public restore ( Flarum\Core\Notification\BlueprintInterface $blueprint ) : void
$blueprint Flarum\Core\Notification\BlueprintInterface
Результат 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));
 }