php - Language locale does not change with App::setLocale but updates on Session::put() in laravel 5.2 -
am working on multi-lingual support laravel app, materials have seen online passing locale app facade , calling setlocale method translates website, have tried no luck. in routes file, have this route::group(['middleware' => ['web']], function () { route::get('change-locale', ['uses' => 'homecontroller@changelocale', 'as' => 'locale.change']); }); homecontroller@changelocale have... namespace gudaapp\http\controllers; use illuminate\http\request; use gudaapp\http\requests; use gudaapp\http\controllers\controller; class homecontroller extends controller { public function changelocale(request $request) { if(empty($request->locale)) { redirect()->back()->withmessage('unknown locale, please, if problem persists, contact admin.'); } session()->put('locale', $request->locale); return redirect()->back()->withmessage('your locale has been changed <b>'.$...