Skip to content

Commit

Permalink
Merge pull request #80 from fyrts/bugfix/home-leading-slash
Browse files Browse the repository at this point in the history
Fix home route URI containing leading slash
  • Loading branch information
chinleung authored Feb 26, 2024
2 parents b2c65b2 + 5ba4e73 commit 58e21bc
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 58e21bc

Please sign in to comment.