Kamis, 05 Juni 2014

How to Set up Session with Laravel

We usually play with session and create the session by server side script like PHP. But, how we create session with client side script?

In this case is EXTJS, you can store cookie instead of session.

The first thing you need to do is setProvider and set a variable into it;

Ext.state.Manager.setProvider(new Ext.state.CookieProvider());

And then to get varA from cookies;


And if you need to clear that value from cookies


That's it!