排除全部为空的行

This commit is contained in:
邓皓元 2019-05-20 09:43:51 +08:00
parent f65ca6610f
commit 6573f3f28d

View File

@ -33,11 +33,9 @@ class ImportService extends Service
$title = $item;
} else {
$row = [];
foreach ($item as $key => $value) {
$emptyRow = true;
foreach ($item as $key => $value) {
$column = strtolower($title[$key]);
if ($columns === null || in_array($column, $columns)) {
$row[$column] = trim($value);