diff --git a/src/SpatieLaravelTranslatablePlugin.php b/src/SpatieLaravelTranslatablePlugin.php index f23e851..4b7b7da 100644 --- a/src/SpatieLaravelTranslatablePlugin.php +++ b/src/SpatieLaravelTranslatablePlugin.php @@ -48,9 +48,11 @@ public function defaultLocales(?array $defaultLocales = null): static return $this; } - public function getLocaleLabelUsing(?Closure $callback): void + public function getLocaleLabelUsing(?Closure $callback): static { $this->getLocaleLabelUsing = $callback; + + return $this; } public function getLocaleLabel(string $locale, ?string $displayLocale = null): ?string