title: how to pass laravel session to vue.js
body: <p>i want to pass <code>langguageid</code> session from laravel to my vue component.</p>
  
  <p>how i can do it?</p>
  
  <p>i try like this, but not working.</p>
  
  <p>my laravel session function</p>
  
  <pre><code>public function getLanguageSession($langid)
  {
      if (Session::has('LangSession')) {
          Session::forget('LangSession');
          $LangSession = Session::put('LangSession', $langid);
          $getLangSession = Session::get('LangSession');
      } else {
          $LangSession = Session::put('LangSession', $langid);
          $getLangSession = Session::get('LangSession');
      }
  
      return redirect('/');
  }
  </code></pre>
  
  <p>and then i call it to vue function</p>
  
  <pre><code> public function getLanguageStringArray(Request $request, $langid)
      {
          $getLangSession = Session::get('LangSession');
          dd($getLangSession);
  }
  </code></pre>
  
  <p>this code return me null value.</p>