file('file'); Excel::import(new ImportMember(),$file); return $this->response()->success('数据导入成功')->refresh(); }catch (\Exception $e){ return $this->response()->error($e -> getMessage()); } } public function html() { return <<导入 HTML; } //表单 public function form() { $this ->file('file', '请选择文件') ->options(['showPreview' => false, 'allowedFileExtensions'=>['xlsx','xls','csv'], 'showUpload'=>true ]); } //上传等待 public function handleActionPromise() { $resolve = <<