Support the ongoing development of Laravel.io →
posted 6 years ago
Session
Last updated 1 year ago.
0

Since you mention axois, I'm guessing you're building a single page app (or at least some page where you do more than one ajax call to the server); I highly recommend NOT to use sessions for it. Sessions are saved by Laravel at the end of the request, meaning that when you have two simultaneous requests, you might loose information that you added.

For building single page apps, you need to think about calling your REST API from within your javascript, and make your code stateless.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Walker Kinne Walker Kinne kinnedev Joined 23 Jun 2017

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.