/cart, which shows the user their cart contents.
Resource::get('/cart', '[email protected]');
[email protected] I check if the user is logged in, and if so check their purchase history to see if they've ordered this item before. If they have, I remove the item from the cart cookie.
My problem is that when returning from the
index method, I have to use
return view('cart.index') because if I use
return redirect('/cart') I'm stuck in an infinite loop.
However, if I don't use
redirect the cookie doesn't update.
How can I update the cookie and send them to the