Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
File upload Laravel 5.3-图像上传不起作用_File Upload_Laravel 5.3 - Fatal编程技术网

File upload Laravel 5.3-图像上传不起作用

File upload Laravel 5.3-图像上传不起作用,file-upload,laravel-5.3,File Upload,Laravel 5.3,我的视图中有一个用于上传图像的输入字段: <input type="file" class="form-control" name="image"> 当我提交表单并上传图像时,没有任何内容上传到上传文件夹,我得到错误: SQLSTATE[HY000]:一般错误:1364字段“image”没有 默认值 您是否尝试在表单上添加enctype和文件-> enctype=“多部分/表单数据”files=“true” $path = $request->fi

我的视图中有一个用于上传图像的输入字段:

              <input type="file" class="form-control" name="image">
当我提交表单并上传图像时,没有任何内容上传到上传文件夹,我得到错误:

SQLSTATE[HY000]:一般错误:1364字段“image”没有 默认值


您是否尝试在表单上添加enctype和文件-> enctype=“多部分/表单数据”files=“true”

$path = $request->file('image')->store('uploads/', 'public');