使用Mail时找不到Laravel类'PhpParser\Parser\Php7'

Did*_*idi 3 php email laravel laravel-5 laravel-5.2

一个星期前我没有遇到任何问题,现在当我尝试发送邮件时: Mail::queue('myemail', $data, function($message) use ($data){....});

我有以下错误:

FatalErrorException in ParserFactory.php line 27:
Class 'PhpParser\Parser\Php7' not found
Run Code Online (Sandbox Code Playgroud)

我该怎么做才能解决这个问题?我正在使用wampserver 3.0.4和laravel 5.2

小智 6

检查这个https://github.com/nikic/PHP-Parser/issues/291它对我有用,删除vendor /中的"nikic/php-parser"目录并运行composer update.