title: Laravel: Locale Session: Controller gets Parameter to change it but it cant. U have to hardcode it
body: <p>I tried to create a Form and do away with Ajax. Yes, the form at least does send the parameter down to the Controller as I var_dumped it and exited in order to see if it had gotten the new value, and yes it did, but guess what? and here is the question:</p>
  
  <p>Even though the Input::get('locale') received from the Controller is the one I sent from the Form, the following code can't get to change the Session.</p>
  
  <p>Controller:</p>
  
  <pre><code>public function languagechooser()
      {   
           $session = \Input::get('language');
           var_dump($session);exit;
           \Session::set('locale',$session);
  
           return\Redirect::back();
      }
  </code></pre>
  
  <p>The only way to change the session is hardcoding it, like this (notice the 'en':</p>
  
  <pre><code>public function languagechooser()
          {   
               $session = \Input::get('language');
               var_dump($session);exit;
               \Session::set('en');
  
               return\Redirect::back();
          }
  </code></pre>
  
  <p>but I dont understand why. Once it receives it from the variable, it should stay in there, but it looks that it does not. Is it a variable after all? But on youtube phpacademy does the same thing (just using Laravel 4) while I use 5</p>
  
  <p>and the Form, just a Form</p>
  
  <pre><code>&lt;form action="{!!URL::route('languagechooser')!!}" method  ="post"&gt;
  
  &lt;select class="form-control" name="language"&gt;
  &lt;option value="fr"&gt;fr&lt;/option&gt;
  &lt;option value=en"&gt;en&lt;/option&gt;
  &lt;option value="es"&gt;es&lt;/option&gt;  
  &lt;option value="ru"&gt;ru&lt;/option&gt;
  &lt;option value="it"&gt;it&lt;/option&gt;
  &lt;option value="de"&gt;de&lt;/option&gt;
  &lt;/select&gt;   
  &lt;button class="btn btn-primary pull-right" type="submit"&gt;Search&lt;/button&gt;
      {!!Form::token()!!}
  &lt;/form&gt;
  </code></pre>