Skip to content

Commit a6777c2

Browse files
authored
Merge pull request #22 from lara-zeus/hot-fix
Make getLocaleLabelUsing usable in service provider
2 parents 87bb4f3 + 6082ce5 commit a6777c2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/SpatieLaravelTranslatablePlugin.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,11 @@ public function defaultLocales(?array $defaultLocales = null): static
4848
return $this;
4949
}
5050

51-
public function getLocaleLabelUsing(?Closure $callback): void
51+
public function getLocaleLabelUsing(?Closure $callback): static
5252
{
5353
$this->getLocaleLabelUsing = $callback;
54+
55+
return $this;
5456
}
5557

5658
public function getLocaleLabel(string $locale, ?string $displayLocale = null): ?string

0 commit comments

Comments
 (0)