this my route
Route::group(
[
'prefix' => LaravelLocalization::setLocale(),
'middleware' => [ 'localeSessionRedirect', 'localizationRedirect', 'localeViewPath','auth']
], function(){
this is working but I want to switch locale in blade like this
<a href="{{\App::setLocale('en')}}" >en</a>
<a href="{{\App::setLocale('uz')}}" >uz</a>
but it is not working , can you give some advise ??? What I should do?
My Answer:
'/products', 'as' => 'products.'], function () {
Route::get('/', 'ProductController@index')->name('index');
Route::get('/{product}', 'ProductController@show')->name('show');
});
Rate this post
4 of 5 based on 2665 votesComments