在控制器中用到了Validator::make(),它默认是use Dotenv\Validator;

但这样会出现

FatalErrorException错误

call to undefined method Dotenv\Validator::make()

解决方法

把use Dotenv\Validator;

改为

use Illuminate\Support\Facades\Validator;

问题就解决了。在此记录下来。