emptyRow
This commit is contained in:
parent
375fc5ade5
commit
f65ca6610f
@ -34,13 +34,22 @@ class ImportService extends Service
|
|||||||
} else {
|
} else {
|
||||||
$row = [];
|
$row = [];
|
||||||
foreach ($item as $key => $value) {
|
foreach ($item as $key => $value) {
|
||||||
|
$emptyRow = true;
|
||||||
|
|
||||||
$column = strtolower($title[$key]);
|
$column = strtolower($title[$key]);
|
||||||
|
|
||||||
if ($columns === null || in_array($column, $columns)) {
|
if ($columns === null || in_array($column, $columns)) {
|
||||||
$row[$column] = trim($value);
|
$row[$column] = trim($value);
|
||||||
|
|
||||||
|
if(!empty($row[$column])){
|
||||||
|
$emptyRow = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
array_push($data, $row);
|
if(!$emptyRow){
|
||||||
|
array_push($data, $row);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user