samedi 2 avril 2016

Append value to existing session Laravel 5

Once in my login I set values of user to session like this..

session()->set("user", $user);

And for get the values of the session from anywhere in my application attach with it to $request $request->_user = $user; like this. So I can get it like this from anywhere

$user = $request->_user;

Thing is I want pass some ID of purchase order at the midle of the application. So can I attach it to existing session or how to create new session and append the ID. With that ID, page redirect to paypal and If user cancel the payment I can catch his canceled payment with that ID. That is why I thought session would help me. After a successful payment it is OK to destroy that session. Help me !!!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire