title: Laravel 6: Localization lost once page redirects
body: <p>I am trying to set up localization on my website. However, when the user clicks on his preferred language, the default redirects function <code>back()</code> returns the default value of appLocale.</p>
  
  <p>Request use to change language:</p>
  
  <pre class="lang-php prettyprint-override"><code>&lt;div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown"&gt;
      @if (app()-&gt;getLocale() !== 'en')
          &lt;a href="/en" class="dropdown-item"&gt;
          &lt;span&gt;
              &lt;img class="flag" src="{{asset('images/bg/gb.svg')}}" alt=""/&gt; {{__('English')}}
          &lt;/span&gt;
          &lt;/a&gt;
      @endif
      @if (app()-&gt;getLocale() !== 'fr')
          &lt;a href="/fr" class="dropdown-item"&gt;
          &lt;span&gt;
              &lt;img class="flag" src="{{asset('images/bg/fr.svg')}}" alt=""/&gt; {{__('Français')}}
           &lt;/span&gt;
          &lt;/a&gt;
      @endif
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>Route</strong></p>
  
  <pre class="lang-php prettyprint-override"><code>Route::get('/{locale}', 'LangController@index');
  </code></pre>
  
  <p><strong>LangController</strong></p>
  
  <pre class="lang-php prettyprint-override"><code>class LangController extends Controller
  {
      public function index($locale)
      {
          app()-&gt;setLocale($locale);
  
          return back()-&gt;permanent();
      }
  }
  </code></pre>
  
  <p>When I check the value of the locale through <code>dd(App::getLocale())</code> it is set to the new value but once the redirect function is executed, Its value moves back to the default local value from the <code>config/app</code>.
  Any idea on how to keep the change after redirecting.</p>