如何使用element ui、vue js和laravel将图像上载到文件夹

如何使用element ui、vue js和laravel将图像上载到文件夹,laravel,vue.js,element-ui,Laravel,Vue.js,Element Ui,我需要关于如何使用element ui、vue js和laravel通过laravel端点上传图像的帮助。 我使用此代码成功地在localhost上上载,但在构建并部署到live server后未能上载,它抛出错误代码405 <el-upload action="/api/upload" list-type="picture-card" name="file[]" :multiple="true"

我需要关于如何使用element ui、vue js和laravel通过laravel端点上传图像的帮助。 我使用此代码成功地在localhost上上载,但在构建并部署到live server后未能上载,它抛出错误代码405

<el-upload
  action="/api/upload"
  list-type="picture-card"
  name="file[]"
  :multiple="true"
  :limit="10"
  :auto-upload="true"
  :on-success="handleAvatarSuccess"
  :file-list="fileList"

.....>

data: {
  return {
   fileList: [],
 }
},
methods: {
  handleAvatarSuccess(res, file) {
    this.fileList = res.data;
  },
}




API
Route::post('/upload', 'PostController@UploadImage');

数据:{
返回{
文件列表:[],
}
},
方法:{
handleAvatarSuccess(资源、文件){
this.fileList=res.data;
},
}
美国石油学会
路由::post('/upload','PostController@UploadImage');
那个么,我将如何在构建后上传到实时服务器上呢。或者如果有更好的选择。谢谢