【发布时间】:2018-01-25 00:15:55
【问题描述】:
我需要保存一张图片,考虑到图片是从请求中正确到达的,之后我需要保存在 storage/app 中。
在控制器类中的代码下方:
public function getImage(ImageRequest $request)
{
$path = $request->image->storeAs( 'images','img.jpg','local');
}
我看到此错误,但没有保存任何内容:
Symfony\Component\Debug\Exception\FatalThrowableError (E_ERROR) 在 null 上调用成员函数 storeAs()
【问题讨论】:
标签: laravel-5