title: Laravel: Call controller with Request::create using POST-method and prevent session from expiring
body: <p>Sorry if it doesn't translate well, I use the google translator, I have the following controller:</p>
  <pre><code>public function call($ruta,$parametros,$cookies) {
  
  // create(string $uri, string $method = 'GET', array $parameters = [], array $cookies = [], array $files = [], array $server = [], $content = null)
  
  $req = Request::create($ruta,&quot;post&quot;,$parametros,$cookies);
  $res = app()-&gt;handle($req);
  $respu = $res-&gt;getContent();
  
  return $respu;}
  </code></pre>
  <p>I call this controller from my websocket server to call the internal functions that I have in my webapp, and I call the function like this:</p>
  <pre><code>$respu = $callController-&gt;call($datos['ruta'],['XSRF-TOKEN'=&gt;$datos['_token']],['_token'=&gt;$datos['_token'],'XSRF-TOKEN'=&gt;$datos['XSRF-TOKEN'],'suplifalcon_session'=&gt;$datos['suplifalcon_session']]);
  </code></pre>
  <p>and I receive as a response a page indicating that it has expired</p>
  <p>I have tried to send all the cookies and the csrf to the websocket server and call the method, but nothing works, does anyone know the solution? Example of what I have tried:</p>
  <pre><code>&lt;meta name=&quot;csrf-token&quot; content=&quot;{{ csrf_token() }}&quot;&gt;
  &lt;meta name=&quot;cooki1&quot; content=&quot;{{ $_COOKIE['XSRF-TOKEN'] }}&quot;&gt;
  
  &lt;meta name=&quot;cooki2&quot; content=&quot;{{ $_COOKIE['suplifalcon_session'] }}&quot;&gt;
  </code></pre>