diff --git a/src/Models/Behaviors/HasSlug.php b/src/Models/Behaviors/HasSlug.php index f85444314..9f93c208f 100644 --- a/src/Models/Behaviors/HasSlug.php +++ b/src/Models/Behaviors/HasSlug.php @@ -383,7 +383,7 @@ public function getSlugParams(?string $locale = null, bool $skipUnchanged = fals if ($appLocale === $locale || $locale === null) { $wasChanged = $this->wasRecentlyCreated; - $translation = $this->translate($appLocale, $this->usePropertyFallback()); + $translation = method_exists($this, 'translate') ? $this->translate($appLocale, $this->usePropertyFallback()) : null; $getAttributeValue = function ($attribute) use ($translatedAttributes, $appLocale, $translation, &$wasChanged) { if (in_array($attribute, $translatedAttributes)) { if (!$wasChanged && $translation?->isDirty($attribute)) {