1 year ago

Session reset on each request but on one controller only

Posted 1 year ago by adrienc921

Hello all,

I'm fairly new to the fantastic Laravel world! I've got a stange issue with Session management.

Sessions works perfectly on my Laravel Spark app: I can login and the session persist without any issue (so no issue with the session storage whatsoever). My only problem is on the WelcomeController (guest auth) where the session is refreshing (can see it on the cookie + on the csrf token) on each request.

I don't understand this behaviour. Just to be sure, I've replicated some code from another page (login) on which it works perfectly but as soon as I put it in my Welcome controller it lets me down.

Here is what I have in the moment (nothing ...) :

namespace App\Http\Controllers;
use Illuminate\Http\Request;

class WelcomeController extends Controller

    public function show()
        return view('welcome');


I guess its inherited. If you have any clue it would be highly appreciated :)

Thanks a lot for your help


Please sign in or create an account to participate in this conversation.