解决办法:到 /app/Http/kernel.php中添加两句代码,如下:
protected $middleware = [ …… …… \Illuminate\Session\Middleware\StartSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class, ];