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

I want localeSessionRedirect to redirect to localized path but the locale as the second route param. #872

Open
Mrbeyond opened this issue Jun 7, 2023 · 0 comments

Comments

@Mrbeyond
Copy link

Mrbeyond commented Jun 7, 2023

Is your feature request related to a problem? Please describe.
I need to refactor my laravel app to have dynamic company slug to prefix all the routes. This would serve as identifier for each branch and to segrate users for each branch because the distinct branch slug serves as url for the branches . This is working fine.

The issue now is with the localization, \Mcamara\LaravelLocalization\Middleware\LocaleSessionRedirect::class is changing the route url by preeceding the url path with en e.g if the path is /dashbord it would change it to en/dashboard which was the default behaviour but I want the locale to come after the branch slug like /branch/en/dashboard rather it's changing it to /en/branch/dashboard.

Describe the solution you'd like
I want to be able change the index or position of the locale redirect on the route param:
e.g to be able to set the redirect to any of this /branch/en/dashboard, /branch/dashboard/en or /en/branch/dashboard.

Describe alternatives you've considered
Nothing yet.

Additional context
Add any other context or screenshots about the feature request here.

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

No branches or pull requests

1 participant