Open AlePix opened 4 years ago
I don't know, but I'm using this approach:
Route::get(LaravelLocalization::transRoute('routes.doctor'), ['App\Http\Controllers\DoctorController', 'show'])->name('doctor');
Ant inside blade template:
<a href="{{ route('doctor', $doctor) }}" ...
Switching language parameters fail to show in url. I'm trying to do a simple editing pages with translatable routes,it seems that everything works, the parameter is intercepted, the user updates his data but when I switch to the language from Iocale to another i receive this url as a response : set 'it' as local language in app.php
http://booking:8888/en/EditProfile/%7Bid%7D
->with language set to 'en' from menu unlike this that i receive with 'it' setting as local in app.php:http://booking:8888/it/ModificaProfilo/21
->with language set to 'it' from menu Viceversa if i set 'en' as local language in app.php i'm getting:http://booking:8888/it/ModificaProfilo/%7Bid%7D
->with language set to 'it' from menu andhttp://booking:8888/en/EditProfile/21
-> with language set to 'en' from menuWeb.php
Ruotes.php files for relative language:
Example of action used in different views:
action="{{ LaravelLocalization::getLocalizedURL(null, trans('routes.updateuser'), ['id' => $user->id]) }}
I really don't understand what's the problem, also because everything is working except that string that should be attached to the url.