|
...
|
...
|
@@ -131,12 +131,13 @@ class InquiryInfoController extends BaseController |
|
|
|
]);
|
|
|
|
if ($this->request->hasFile('file')) {
|
|
|
|
$path = $this->request->file('file')->getRealPath();
|
|
|
|
var_dump($path);
|
|
|
|
die();
|
|
|
|
$spreadsheet = IOFactory::load($path);
|
|
|
|
$worksheet = $spreadsheet->getActiveSheet();
|
|
|
|
$rows = $worksheet->toArray();
|
|
|
|
foreach ($rows as $row) {
|
|
|
|
foreach ($rows as $k =>$row) {
|
|
|
|
if($k == 0){
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
// 创建模型实例并设置属性
|
|
|
|
$inquiryInfoLogic->ImportInquiryInfoSave($row);
|
|
|
|
}
|
...
|
...
|
|