MartinZeltin
2 months ago
197
2
Laravel

How to have multiple domains for COOKIE session?

Posted 2 months ago by MartinZeltin

My application can be accessed using 2 different domain names www.4evergaming.com and www.best4games.com

Here is how my routes file looks like

Route::pattern('domain', '(www.4evergaming.com|www.best4games.com)');
Route::domain('{domain}')->group(function ()
{
	// Routes here...
})

But in my config/session.php I can only have one domain...

'domain' => '.4evergaming.com',

I need to set session cookies for both domains but how can I do this?

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