php - Laravel Session: sessions for subdomain is not setting on the browser -


is possible setup 2 different laravel project on same domain , same server different authentication??.. 1 on maindomain.com , 1 'sub.maindomain.com'.

i've been trying setup config/session, config/auth, config/database different drivers/configurations still tokenmismatchexception many times, seems session not persisting or something,

here's configuration:

'lifetime' => 120, 'expire_on_close' => false, 'driver' => env('session_driver', 'file'), // tried setting database, redis, file, cookie, 'domain' => env('session_domain', null), // tried setting null,  '.maindomain.com', 'sub.maindomain.com', 'cookie' => 'maindomain_session', // subdomain, set 'sub.maindomain.com' 

i've tried different settings 2 project, keep on getting tokenmismatchexception sub-domain. don't know if set correctly though..

i've checked browser if session set in there, , found out there none,

and test check if there's session storing on browser:

route::group(['prefix' => 'test'], function() {    route::get('session', function() {     session::put('testing', 'hello world');     return redirect('test/session-result');   });    route::get('session-result', function() {     return 'this should output session: '.session::get('testing');   });   // server responded 'this should output session: ' text. }); 


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -