I have a shopping cart ID that I'd like to save somewhere to pick up the cart later when the user comes back. Should I put it in the session or better in a cookie? (Session config 'lifetime' => 43200)
Or in other words is there any issue if my session lifetime is very long?
I'd say it depends how you want to save the data.
If you want them to be able to come back the next day with their cart still filled use a cookie, else a session would be wise. Keep in mind that if you decide you go for a cookie that a shared computer remembers the data so others would be able to see what's in the cart if they visit the website too.
I myself would recommend a session in this case.
I don't know much about the actual data transfer for sessions and am unsure if it would be wise to have such lenght on a session.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community