I'm trying to login to a subdomain users.mydomain.com. To test the session, I'm just displaying what I type in the login field on the screen with the code in the controller:
if($request->session()->has('session_login'))
return view("welcome", ["session_login" => $request->session()->get('session_login')]);
After that a simple {{$ session_login}} correctly displays what I typed. However I also want to use this same session in the clinic.domain.com subdomain, but it is not working. I put the following code in the controller of this second subdomain:
if($request->session()->has('session_login'))
View::share('session_login', $request->session()->get('session_login'));
else
View::share('session_login', "BBB");
But always only displays "BBB" in the second subdomain. I already configured the sessions.php file in both applications, putting 'domain' => ".i9technology.com.br"
, and I'm also using Homestead. What's missing for this session to work in both subdomains?