diff --git a/src/PersistentData/PersistentDataManager.php b/src/PersistentData/PersistentDataManager.php index 60fec89..e3096d2 100644 --- a/src/PersistentData/PersistentDataManager.php +++ b/src/PersistentData/PersistentDataManager.php @@ -125,7 +125,8 @@ class PersistentDataManager implements IPersistentDataManager } } else { if ($model instanceof ModelWithSlug) { - $modified['slug'] = $this->generateUniqueSlug($model, $modified['slug']); + $slug = $model->generateSlug(); + $modified['slug'] = $this->generateUniqueSlug($model, $slug); } $modify->fill($modified);