Search code examples
sessionlaravellaravel-4session-cookiessession-state

how to make stateless web app with laravel


I will be using stateless web app architecture. For authentication I will be encrypting the authenticationid and putting it in client cookie and sending it to client as described here.

But I see that when a get request is send to the server, the response contains a cookie named laravel_session. I've read that for a stateless architecture, there should be no session as otherwise it would mean that session state is stored at server.

How to remove any kind of session from laravel to make my app stateless?


Solution

  • Set session driver:

    cookie - a cookie-based session driver where session data is encrypted in the user's cookies.

    array - session data is saved in a PHP array. Take note that the array session driver does not support persistence and is usually only used in console commands and tests.