I am struggling with the problem of the laravel session. This page works on the problem bases on the server, but when I moved it to the new one and changed the domain, during login or registration, I get an error
The page has expired due to inactivity.
Please refresh and try again.
I send the token correctly in the meta tag and in the form. On the old server, the page still works correctly, when I downloaded files from it and uploaded to localhost, the same error occurs. I've already dug all threads in various forums but nothing helped.
I am asking for help and thank you in advance.
<?php
return [
'driver' => env('SESSION_DRIVER', 'file'),
'lifetime' => env('SESSION_LIFETIME', 120),
'expire_on_close' => false,
'encrypt' => false,
'files' => storage_path('framework/sessions'),
'connection' => null,
'table' => 'sessions',
'store' => null,
'lottery' => [2, 100],
'cookie' => env(
'SESSION_COOKIE',
str_slug(env('APP_NAME', 'laravel'), '_').'_session'
),
'path' => '/',
'domain' => env('SESSION_DOMAIN', null),
'secure' => env('SESSION_SECURE_COOKIE', false),
'http_only' => true,
'same_site' => null,
];