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

I believe laravel leaves the domain resolution to the setcookie() function if you don't specify it explicitly. Which should mean a cookie set on a non-subdomain'd domain, should work on subdomains (according to the docs) but it appears not to be working.

In your app/config/session.php you should see a "domain" key. Try setting this to: ".dongkoy.com" (dont forget the dot at the start).

See if that works for you

Last updated 2 years ago.
0

Thanks leesherwood but still doesn't work for me :(

Last updated 2 years ago.
0

Ideally you should set a rule in your .htaccess to redirect users to one or the other. For best practices, you should only use the one. This should then solve the cookie issue, as a user will not be able to access both.

Last updated 2 years ago.
0

Brilliant idea thank you very much pickupman

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

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.