lundi 20 février 2017

How to determine if a session with same variable is already there in laravel

I am using Laravel framework. There is a function in controller that creates session with name store_id

StoreController.php

function initiate($id)
{
    //Some queries
    session['store_id' => 'some value'];
}

Now if I run this function on one tab then session::get('store_id') is going on. But if I open another tab in the same browser then again run the function that means session('store_id') will be again set. How do I handle this situation that if there is already a session then it should redirect to it's perspective url.



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

Aucun commentaire:

Enregistrer un commentaire