Support the ongoing development of Laravel.io →
posted 8 years ago
Session
Last updated 2 years ago.
0

are you using the web middleware? apparently in 5.2 you need to be using web middleware for sessions etc otherwise I am assuming it is regenerating a new session..

0

shez1983 said:

are you using the web middleware? apparently in 5.2 you need to be using web middleware for sessions etc otherwise I am assuming it is regenerating a new session..

I have not changed anything in Laravel 5.2. Currently, i have a Laravel package which needs to use Laravel Session in some its custom classes and it's still working ok in Laravel 5.1.

Did you run my TestController in Laravel 5.2 and get different session id like me? In case, everything is working ok in your Laravel app, could you please give me an example...? Thank you!

Last updated 8 years ago.
0

i asked a specific question.. you should be using WEB middleware which LARAVEL doesnt register to routes for you automatically like it did before!

i am using 5.1 and in no hurry to upgrade to 5.2..

0
Solution

shez1983 said:

apparently in 5.2 you need to be using web middleware for sessions..

you're right, thank you for that reply. i should be using web middleware for sessions:

Route::group(['middleware' => ['web']], function () {
    Route::get('test', 'TestController@test');
});
Last updated 8 years ago.
0

Route::group(['middlewareGroups' => ['web']], function () { ... });

0

Sign in to participate in this thread!

Eventy

Your banner here too?

alaman alaman Joined 23 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.

© 2024 Laravel.io - All rights reserved.