Hello,
I'm working on a projet, i have push my laravel projet on a Git and i'm working with 3 mates. For me, everything's fine, i have a UserController checking if credentials are ok with Auth::attempt and in other part of my code i can call Auth::check().
When my friend pull the content, the project is working, Auth::attempt() works fine, but the Session is not persistent (his /storage/app/sessions if full of files, one file is create at every attempt() call). Every time he call Auth::check(), the function return false.
We have the same files (only vendor/ and .env are ignored by the .gitignore)
My laravel version is 5.4.0
If anyone know how to fix the problem ?
Thank you ;)
Sometimes this could happen if you do not set the session config file properly and you have many laravel projects running on the same machine.
Try setting up your Session Cookie Domain under config/session.php
'domain' => '.yoursite.com', //keep the dot
Try switching driver to database in config/session.php
'driver' => env('SESSION_DRIVER', 'database'),
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community