It will be better if you can show the code on what you are trying to do.
session variable is not updating in ajax request
hello. in product details page I have a form by which I can add the product to cart through ajax. cart date are stored in a session variable . ajax request looks not updating session variable. I tested using ordinary http request and redirected to another route after setting session variable and everything is okay. however ajax request cannot update session variable. please help
There are couple of things that I cannot say because I cannot see your code.
So is the route that you are hitting an API route or a normal one defined in your web.php? Because if it is an API there won't be a session.
Then how do you test? Do you check your browser's network tab to make sure that the request reaches the server side and it returns successful? Also that your $data on the server contains the data?
Please or to participate in this conversation.