Skip to content

Commit

Permalink
Merge pull request #22 from lara-zeus/hot-fix
Browse files Browse the repository at this point in the history
Make getLocaleLabelUsing usable in service provider
  • Loading branch information
atmonshi authored Dec 25, 2024
2 parents 87bb4f3 + 6082ce5 commit a6777c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/SpatieLaravelTranslatablePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a6777c2

Please sign in to comment.