Laravel 使用file方法访问上传文件时报错:

Call to a member function store() on null

解决方法:
在file方法中指定请求参数名称

$path = request()->file('video')->store('videos/'.date('Ym/d'), 'common');
©本文为原创文章,著作权归博主所有,转载请联系博主获得授权

发表评论