正在显示
1 个修改的文件
包含
5 行增加
和
0 行删除
| @@ -124,6 +124,11 @@ class InquiryInfoController extends BaseController | @@ -124,6 +124,11 @@ class InquiryInfoController extends BaseController | ||
| 124 | * @time :2023/7/13 10:39 | 124 | * @time :2023/7/13 10:39 |
| 125 | */ | 125 | */ |
| 126 | public function importInquirySave(InquiryInfoLogic $inquiryInfoLogic){ | 126 | public function importInquirySave(InquiryInfoLogic $inquiryInfoLogic){ |
| 127 | + $this->request->validate([ | ||
| 128 | + 'file'=>'required', | ||
| 129 | + ],[ | ||
| 130 | + 'file.required' => 'w文件不能为空', | ||
| 131 | + ]); | ||
| 127 | if ($this->request->hasFile('file')) { | 132 | if ($this->request->hasFile('file')) { |
| 128 | $path = $this->request->file('file')->getRealPath(); | 133 | $path = $this->request->file('file')->getRealPath(); |
| 129 | $spreadsheet = IOFactory::load($path); | 134 | $spreadsheet = IOFactory::load($path); |
-
请 注册 或 登录 后发表评论