lundi 27 janvier 2020

Localization is not working for all url in Laravel

Localization is not working for some URL in my Laravel project.

Here are some routes

route A : Route::get('/doctor', 'homeController@doctor');

route B : Route::get('/doctor/{data}', 'homeController@doctor_detail');

localization url :

Route::get('locale/{locale}',function ($locale){

    Session::put('locale',$locale);

    return redirect()->back();

});

Custom Error Route:

 Route::any('{catchall}', function() {

  return App::call('App\Http\Controllers\errorController@error');

})->where('catchall', '.*');

Localization works for route A but gives error for route B.

Can't find any solution yet.

Anybody help please ? Thanks in advance.

If anything need regarding the issue please tell me, I will provide.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/38JWuRY
via IFTTT

Aucun commentaire:

Enregistrer un commentaire