Personally I have the following error:
ReflectionException
Class Illuminate\Cookie\Middleware\EncryptCookies does not exist
I'm using Lumen but I think I may have set something wrong in the app.php:
$app->middleware([
Illuminate\Cookie\Middleware\EncryptCookies::class,
Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
Illuminate\Session\Middleware\StartSession::class,
Illuminate\View\Middleware\ShareErrorsFromSession::class,
//Illuminate\Cookie\Middleware\EncryptCookies::class,
]);
$app->routeMiddleware([
// 'auth' => App\Http\Middleware\Authenticate::class,
]);