The scenerio is that I am authenticating user by ajax call, after authentication I am setting session variables, then returning true value to ajax, where in success ajax callback page is redirecting to another page where I am priting session values but nothing is set. but when I am priting session values in controller before sending it to ajax success callback there I am getting session values.
Arun Yokesh
Developer @ Appoets
// to store in session $request->session()->put('key', 'value'); // to get session $request->session()->get('key', 'default');In Laravel 5.2, everything need to be given a web middleware in order to use cookies or sessions. It is not mentioned in Laravel upgrade guide though.
Use laravel 5.3, sessions are improved a lot.