Tuesday, March 7, 2017

Laravel one session with subdomain

I have my site example.com on laravel. I have site on subdomain support.example.com on laravel. I install support Database in main site db (without db prefix,to use a common table 'users').

I want if user logged in main example.com site, his session is active for support.example.com (Since it is the same user from the database).

I changed app/config/session.php to this for both site:

'domain' => '.example.com'

Changed driver to databes | cookie | file but if I go to support.exmaple.com I am immediately logged off with exmaple.com, and nothing sessions is not saved



via Likn Mike

Advertisement