Route::group(['middleware' => ['web']], function () { // }); 仍然報錯,看了 session是使用默認file,沒問題;文件也是可寫的,然后在
Kernel.php中添加了
protected $middleware = [ \Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class, \Illuminate\Session\Middleware\StartSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class, ];
什么都沒干就突然報如下的錯誤:
RuntimeException:Session store not set on request.
解決辦法:
可能是你的一些安裝組件需要更新了,試一下:
[php] view plain copy composer update
再運行試試看。
如果你是使用文件session 檢查你storage 目錄是否有寫入權限 使用 database 檢查有沒有sessions表 使用memcache/redis 有沒有啟動memcached和redis 服務,已經(jīng)有沒有裝相應拓展
以上就是session一直報錯Session store not set on request的詳細內容,更多請關注php中文網(wǎng)其它相關文章!