Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support root routes in route groups #81

Merged
merged 3 commits into from
Mar 27, 2024

Conversation

fyrts
Copy link
Contributor

@fyrts fyrts commented Mar 13, 2024

Currently, the following route definition always drops the locale prefix:

Route::prefix('prefix')->group(function () {
    Route::multilingual('/')->name('index');
});

localized_route('index') now always results in /prefix instead of /{locale}/prefix when applicable (regardless of settings).

I've modified MultilingualRegistrar::generatePrefixForLocale so that it doesn't drop the locale prefix when a group prefix applies.

@fyrts fyrts marked this pull request as ready for review March 13, 2024 14:12
@chinleung
Copy link
Owner

Sorry for the delay and thanks for the fix @fyrts!

@chinleung chinleung merged commit d1e2455 into chinleung:v4 Mar 27, 2024
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants