Persisting sessions across subdomains in Laravel 5

Figured it out. Update domain => '.example.com' in session.php and clear the cookies for the site in question.


@gadss

you need to add session table like this

php artisan session:table

composer dump-autoload

php artisan migrate

and change .env to SESSION_DRIVER=database

also modify config/session.php

'driver' => env('SESSION_DRIVER', 'database') and

'domain' => '.yourdomain.com'

after that clear your browser's cache and cookies.