Search code examples
phplaravelsessionsubdomainconfig

how i can fix this error in laravel about subdomain


I use a test domain in laravel and one subdomain is in use. Everything works fine,

test.com and user.test.com

but, Login function does not work on test domain

I have verified that the session file is generated at stoage / sessions

when I done login, it does not cognize my session. The login function works well on localhost url. how i can fix that?

i'm done config like this below

config / session.php 
domain => ".test.com"

And if I set up like above, can I share login information between two domains?


Solution

  • Clear the cookies for the site and then try to log in again. Or If the issue still persists then try to change Session Cookie Name in config/session.php