作者 lyh

gx

@@ -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);