I am trying to store an array of values in a session variable.
So when I am trying to add a variable I simply do:
$request->session()->push('some.array', $id);
When I am trying to pull it out, I do:
$request->session()->pull('some.array', $id);
I can add as many number of elements using the push method but when I try to pull it, it deletes the whole array. How to go around this problem. How to delete only the element with a specific id?
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1MPzNNq
via IFTTT
Aucun commentaire:
Enregistrer un commentaire