I try to access the current user in my custom middleware from the web group.
To use the session on multiply domains I set the domain value in the session config 'domain' => env('SESSION_DOMAIN', '.localhost'),
. Then I login to my application.
When I call http://localhost
the content of $request:user()
is not null. But when I call http://test.localhost
the object is null.
What is wrong?