Support the ongoing development of Laravel.io →
posted 9 years ago
Session

I installed a fresh installation today, but the Session is not working, the files in 'sessions' folder are not being created. I have checked the permission its 777 still its not working.

This is what I am doing in controller.

return redirect()->back()->with('form-data',Input::all())->with('error', "Invalid username or password");

When I access these in view they aren't set.

print_r(Session::get('form-data'));

Same code used to work in 4.2.

I have searched a lot and after that posting here only. Thanks

Last updated 2 years ago.
0

I think I have fixed it, there is web middleware in routes now, I wasn't using that earlier. So now it becomes:

Route::group(['middleware' => ['web']], function () {
    Route::get('user', 'UserController@index');
		Route::post('user/login/validate', 'UserController@loginValidate');
});
Last updated 9 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

vivdub vivdub Joined 28 Dec 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.