我的網站得到了這樣的錯誤:會話存儲在Laravel沒有設置要求5.3
我也試過在中間件的網絡狀包裝路線一些解決它,它不工作
這裏是我的Kernel.php
<?php
namespace App\Http;
use App\Http\Middleware\Activated;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
class Kernel extends HttpKernel
{
protected $middleware = [
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
];
protected $middlewareGroups = [
'web' => [
\App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
\anlutro\LaravelSettings\SaveMiddleware::class,
\Barryvdh\Cors\HandleCors::class,
Activated::class
],
'api' => [
'throttle:60,1',
'bindings',
],
];
(The rest of file)
}
我怎樣才能解決:((
的可能的複製[Laravel - 對請求未設置會話存儲器(https://stackoverflow.com/questions/34449770/laravel-session-store-not-set-on-request) –