mercredi 4 mai 2016

Can't forget session from ajax request in laravel 5.2

I am running a jquery ajax post to my controller, where i check if a session exists. If that is the case i read the value, forget my session and return some data to the view.

If i use session()->has in the controller function after i use forget, it is removed. But when i reload the page and do the ajax request again the session is still there.

In my controller i tried removing it with both forget and pull.

$request->session()->forget('last_history_id');
$request->session()->pull('last_history_id')

So my question is, why can't i forget sessions in my ajax request so it's gone with the next page reload?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1T1eMES
via IFTTT

Aucun commentaire:

Enregistrer un commentaire