lundi 1 février 2016

Laravel session data is lost after click

class FileController extends Controller
{
    public function login()
    {
        /*
         * TODO: Handle via CAS
         * Hardcoded for demo purposes
         */
        Session::put('isLogged', true);
        Session::put('index', "123456");

        return View::make('login');
    }

    public function user()
    {
        if(Session::get('isLogged') == true )
            return View::make('user');
    }
}

I have the following code. There is a link on login that goes to the FileControllers@user . On the second page my session data is lost (Session::all() is empty). What could be causing this issue?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire