Laravel:The page has expired due to inactivity. Please refresh and try again.

如果以POST方式提交表单,表单中不含csrf_field(),可能会出现如下之类的错误:

The page has expired due to inactivity.   Please refresh and try again.

如果表单中含有csrf_field(),那可能需要下面这种方式:

验证你的config / session.php文件是否包含这一行

'domain' => env('SESSION_DOMAIN', null),

然后删除SESSION_DOMAIN.env文件中的行。

Last modification:August 7th, 2019 at 09:18 am
If you think my article is useful to you, please feel free to appreciate

Leave a Comment