laravel 解决Validator使用中出现的问题

2020-09-01 14:51:08

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

但这样会出现

FatalErrorException错误

call to undefined method DotenvValidator::make()

解决方法

把use DotenvValidator;

改为

use IlluminateSupportFacadesValidator;

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

相关文章 大家在看