Laravel 5.3 session don't want to delete
I try to make cart with session and now I cant delete it even if I do php artisan cache:clear its still there
@bajro17 What session driver are you using in your config?
I fix this my bad I use file but now I need help how to reduce items I making cart
this is my: store function where I add product in cart
public function store($id)
{
$product = Product::find($id);
Session::push('korpa', $product);
return back();
}
how to reduce now I try with Session::pull($product, 'korpa'); this dont work
I fix this too :) if someone need it I will put all here
public function store($id)
{
$product = Product::find($id);
Session::push('korpa', $product);
return back();
}
and my delete function
public function destroy( $id)
{
Session::pull('korpa.'.$id);
return back();
}
I just now need when I add item in cart it add new instance even if same item how to just update quantity
Please or to participate in this conversation.