Closed m-valvano-zakeke closed 2 years ago
Hello,
That is rather weird. But the localizedUrl method was intended for the current URL and accepts a locale instead of a slug. You probably want this:
// Get specific locales...
// This is most useful if you want to generate a URL to switch language.
$url = route('about', [], true, 'en'); // /en/about
$url = route('about', [], true, 'nl'); // /nl/about
I will see what is going on with that public prefix though...
Hi!
When I try to redirect to a localized route with the Route::localizedUrl method, if the URL has a final slash it will redirect to the same URL, but with the public/ prefix.
For example, Route::localizedUrl("products") will redirect to "it/products" but Route::localizedUrl("products/") will redirect to "public/it/products".
I have the last version of the package.
Any idea?
Thanks! Mauro