一起源码网

标题: session一直报错Session store not set on request [打印本页]

作者: 云文章    时间: 2020-6-21 10:30
标题: session一直报错Session store not set on request
Route::group(['middleware' => ['web']], function () {
    //
});
仍然报错,看了 session是使用默认file,没问题;文件也是可写的,然后在
Kernel.php中添加了
protected $middleware = [
    IlluminateFoundationHttpMiddlewareCheckForMaintenanceMode::class,
    IlluminateSessionMiddlewareStartSession::class,
    IlluminateViewMiddlewareShareErrorsFromSession::class,
];

什么都没干就突然报如下的错误:

RuntimeException:Session store not set on request.

解决办法:

可能是你的一些组件需要了,试一下:

[php] view plain copy
composer update

再运行试试看。

如果你是使用文件session 检查你storage 目录是否有写入权限 使用 database 检查有没有sessions表 使用memcache/redis 有没有启动和redis 服务,已经有没有装相应拓展


作者: 丨≧炜≦丨    时间: 2022-7-25 05:00
无损音乐免费最全网址




欢迎光临 一起源码网 (https://www.171739.xyz/) Powered by Discuz! X3.3