Skip to content

Commit

Permalink
fix: remove leading slash from prefixed home route
Browse files Browse the repository at this point in the history
  • Loading branch information
fyrts committed Feb 22, 2024
1 parent 6f4aac7 commit 5ba4e73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MultilingualRegistrar.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ protected function generatePrefixForLocale(string $key, string $locale): ?string
protected function generateUriFromKey(string $key, string $locale): string
{
if ($key === '/') {
return $this->shouldNotPrefixHome($locale) ? '/' : "/{$locale}";
return $this->shouldNotPrefixHome($locale) ? '/' : $locale;
}

return Lang::has("routes.{$key}", $locale)
Expand Down

0 comments on commit 5ba4e73

Please sign in to comment.