Here is the problem I have a session
session('products')
this is actually an array that contains id
session('products')
1
2
3
4
5
Now I want to delete lets say 4
How do I do that? I tried method
session()->pull($product, 'products');
But it didn't work!
Other solution
session()->forget('products', $product);
it also didn't work
via Alen