title: Laravel - sessionId changes inside controller after ajax call from axios
body: <p>When I retrieve my sessionId from view like this <code>$session_id = Session::getId();</code> it works and the id does not change. <br>
  However when making API calls to api route to a controller, it returns a different <code>$session_id</code> everytime.  <br>
  How can I keep get the sessionId that is called from my view?<br/>
  I suspect middleware has something to do with it.</p>
  <pre><code>namespace App\Http\Controllers;
  use Illuminate\Http\Request;
  use Illuminate\Support\Facades\Auth;
  
  class MyController extends Controller
  {
    public function sample(Request $request){
      $session_id = \Session::getId();
      return $session_id; 
    }
  
  }
  </code></pre>
  <p>my route:</p>
  <pre><code>Route::middleware('api')-&gt;post('/test', function (Request $request) {
      $aa = new MyController();
      $session_id = Session::getId();
      $obj = $aa-&gt;mymethod($request, $session_id);
      return $obj;
  });
  </code></pre>