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
Thanks leesherwood but still doesn't work for me :(
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.
Brilliant idea thank you very much pickupman
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community