我试图使用laravel保存来自POST请求的图像。但这给了我以下错误。
Container.php第741行中的ReflectionException:类图像不存在
我做了以下事情:在php.ini文件中启用fileinfo扩展名和composer dumpautoload
但没有任何工作,我遵循了准则here我正在使用laravel 5.1
我的代码如下所示
public function saveImage(){
Image::make(Input::file('files')->getRealPath())
->resize(870, null, true, false)
->save('foo.jpg');
}
您是否在文档顶部添加了课程?
use Intervention\Image\ImageManagerStatic as Image;