How to authenticate the user at once on all subdomains of the main domain, searched in nete it says that you need to use the database as a session storage and specify the session in the config file

.aproject.com 

, but for some reason it does not work, when I do this authentication at all, even on the main domain.

    2 answers 2

    For 5.2, check the .env file - specify SESSION_DRIVER=database .

      If you are using the latest version - make sure that all your routes are grouped under middleware web

       Route::group(['middleware' => 'web'], function($route){});